Adding some essential functionality to SharePoint: Breadcrumbs, Navigation & MyAlerts

Update2: http://weblogs.asp.net/jan/archive/2004/03/11/88118.aspx
Update
: I've added a What's New web part to this library, for more details: http://weblogs.asp.net/jan/archive/2004/03/04/84011.aspx

In some of my previous posts I've complained a little bit about the rather limited SharePoint functionality. But I'm lucky: SharePoint is extremely extensible and (last but not least) I'm a developer! (don't know which of the two is the best) So I've created following webparts:

  • Leadit.SharePoint.Essentials.Navigation
    Navigation in SharePoint isn't great, you can view subsites and stuff like that by using the Site Settings page but this isn't a great “user experience“ (nice buzz-word isn't it?). So now there is the Navigation webpart which displays the structure of a SharePoint portal in a tree structure (only the sites to which the user has access are showed).


    There are two properties for this webpart which you can use to tweak the contents. The Levels property determines how many levels in the tree structure should be showed. If you select the Start from Root property, the tree structure starting from the root site is displayed, even if you place this webpart on a subsite.


  • Leadit.SharePoint.Essentials.MyAlerts
    Just like the Navigation webpart, the MyAlerts gives you a shortcut to the alerts of the site the webpart is placed on, for the current user of course.

    Additionally this webpart enables you to quickly add an alert for each list on the site.
  • Leadit.SharePoint.Essentials.BreadCrumbs
    The last one is pretty simple, as the name says: it displays breadcrumbs:

    Again there are two properties to alter the contents of this webpart. The Levels property sets the number of links to display. The Separator property enables you to change the characters displayed between the links. Since I like slashes the default is space + slash + space.


These three webparts are in the Leadit.SharePoint.Essentials assembly. To deploy them, just put this assembly in the GAC (for example), put the DWP files in the wpcatalog directory of your SharePoint site and add the following node to the SafeControls section of the web.config:
<SafeControl Assembly="Leadit.SharePoint.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1a431c1526626774" Namespace="Leadit.SharePoint.Essentials" TypeName="*" Safe="True" />
I've deployed these webparts to some site without any problems, but please test them before you use them in a production envirionment! :-) If you don't like them, feel free to alter the source code, I'd appriciate if you'd let me know what you changed. The source code or the binaries can be downloaded using following links:

Updated versions (more info):

Again updated: http://weblogs.asp.net/jan/archive/2004/03/04/84011.aspx

41 Comments

  • Great job, Jan. We'd like to license these for use on our hosting server -- drop me a line with pricing information. :)

  • How do you install these web parts? Just import them? I noticed a dll file ...where does that go?

  • To deploy them, just put this assembly in the GAC (for example), put the DWP files in the wpcatalog directory of your SharePoint site and add the following node to the SafeControls section of the web.config:

    &lt;SafeControl Assembly=&quot;Leadit.SharePoint.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1a431c1526626774&quot; Namespace=&quot;Leadit.SharePoint.Essentials&quot; TypeName=&quot;*&quot; Safe=&quot;True&quot; /&gt;

  • where does the .dll go? In the same folder as the .dwp files?

  • You put the dll in the GAC (Global Assembly Cache) or the \bin directory of your directory for the website.

  • I'm just wondering about the comment from Eric Legault calling Jan &quot;She&quot;.



    Now I used to work with a Dutch guy called &quot;Jan&quot; and a bit later had a long e-mail correspondent with a guy called &quot;Jan&quot; in England who turned out to be a woman.



    I suspect that Eric has made the same mistake in reverse as surely this Benelux Jan is a man!



    Sorry not to make a Sharepoint comment but I'm going to look at these on my test sites at work.

  • Mike, you're right! I'm male :-) But Eric has already corrected this on his site.

  • Nice part,



    Too bad the crumbs part shows the c&lt;n&gt;-sites.



  • What do you mean by c&lt;n&gt;-sites?

  • I get some error as below.



    A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe.





  • I am having trouble as well. I can't seem to get the web part registered as safe - I've edited the 6 or so web.config files I could find, but no go.

  • Hi, Jan I was wondering if you'd be willing to share the source for this. I'm just getting going with WSS web part development and these are exactly the type of things I'm trying to learn to do.

  • Doh! I see that's what the second file is... ok, ok, nevermind and much thanks.

  • Mike, just check the links at the end of the post! :-)

  • My subsites don't show (everything is on the first level). Level is set to 5. Could it be because of a German Sharepoint Portal?

  • terrific stuff... thanks..

  • Sorry, used this in the Portal (where it does not show the structure of subareas). Works fine on Sites.

  • I want to use IE Web Control to generate Tree struct of Document. Then, How can I deploy the IE web control?

  • I want to generate Tree by IE Web Control!!!!

    please help me, I am crazy!!!





    My E-mail: defrostcn@yahoo.com.cn

  • I was wondering if you know if there is an advanced search web part for SharePoint services?

  • Not that I'm aware of...

  • A few users have posted the message &quot;A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe.&quot;. Unfortunately I have the same, althought I have followed the recommended steps. Any ideas what to look for?

    TIA,

    Paul

  • I've run into the same issue as Paul Ibison - followed the directions, but can't apply the webpart. I've used SPS01 for almost 3 years, but am completely new to SPS03/WSS. How can I resolve this issue?

  • I've added the breadcrumbs to my site with no problems using the .msi file. They display, however, they do not work. First of all it only displays the top level so any pages that I drill down into it still only displays one item for the top level. Secondly the one that is displayed does not act as a link. This may because it is only showing one level and as more levels are visible then they become links. How do I get it to display levels as I drill down?

  • Hi, can this tree web part include other object such as the doc libraries, Lists othre than just sub sites?

  • Joe, no, not at this point.

  • I have installed these great search &amp; breadcrumb's, only problem is that search keep's returning 404 and breadcrumb shows only the site it's placed not the trail to top.

    Can anyone help me on this? Crateful allready.

  • I would like to add this as a static web part in a template. What would the connection code look like?

  • I get the same problems:

    A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe.





    Cant seem to find a solution on this forum either.

  • Very nice webparts. But I have a question regarding the navigation webpart. On the main site for the whole portal (I have called it MainPortal) I have put the navigation webpart. Under the main portal, I have 2 sites, called TestSite1 and TestSite2. Under TestSite1 I have another subsite called SubTestSite1.

    On the navigation webpart that I have put on the main portal page, I get a list of a lot of things, but everything is on the same level, and the sites are not there (I have chosen 5 levels...). The closest I get is a link to &quot;sites&quot; which takes me to the sites page. And from there I can navigate to TestSite1 etc. But I was hoping to get a tree view on the main portal page which included TestSite1 with SubTestSite1 under it, TestSite2 etc...

    Have I misunderstood anything? Or am I doing something wrong??

  • Hi, I'm using this webparts but the Leadit.SharePoint.Essentials.Navigation only show the first 2 levels on the tree if I use it on the top-level site, if i put the webpart further down the tree of sub-areas it only appers the area itself and none of the subareas, there is a solution for this? Thanks!

  • Hi there,

    Compliments on your fine web part....it is highly customisable and intuitive.



    One question - is it possible to set the menu to be expanded by default? -- so the user does not have to press the &quot;Sync Tree&quot; or other levels to view the 1st level of the tree?



    Cheers,

    Shane

  • somewhere along the post, I seem to have read that these webparts do not work for Doc libraries and lists(works only for subsites). Is that accurate? I'm a amateur administrator on a Sharepoint site and would like to implement your breadcrumb functionality based on your response.

    Thanks

  • To all those having issues with "unsafe" web parts, I also ran into this issue. The few key points that made it work for me:

    1. Make sure version numbers are consistent between web.config and the .dwp file for that assembly.
    2. Make sure public key is the same between web.config and the .dwp file for that assembly. Further, make sure it's the right public key. =]
    3. RESET YOUR IIS AFTER EDITING WEB.CONFIG.

    For some reason, the changes didn't propagate until I completed that last step; after that, the web part was "safe" as could be.

  • Nice site you have!

  • E evidente che il luogo e stato fatto dalla persona che realmente conosce il mestiere!

  • Lo trovo piuttosto impressionante. Lavoro grande fatto..)

  • I have a different problem. How do you keep the Site Navigation visible when you add a new page to the site? Although new subsites behave as you would expect and allow you to control the quicknav via the Site Settings | Navigation admin page, new pages do not behave this way. I cannot figure out how to keep the left-hand quicknav navigation visible when I add a new webpart page to a site.

    Thanks for any help!

  • Hi, Jan I was wondering if you'd be willing to share the source for this. I'm just getting going with WSS web part development and these are exactly the type of things I'm trying to learn to do.

    Amit

  • Hello Jan,
    We work with breadcrumb 1.0.0.0, but want to upgrade to 1.1.1.0, just because we've some sites with spaces in the name.
    We've removed the breadcrumb from all the sites, uninstalled 1.0.0.0, when we now install 1.1.1.0 (the msi) the installation stops immediately after global assambly cache. The new version isn't installed, although the event viewer says it is.
    What's wrong, how can we install 1.1.1.0?

    email to g.tjaarda@abt.eu

  • Hi Jan....
    i have jst used ur bread crumbs.. & its amazin....
    but the prob is tht i cannot use it for DOs & List...
    Is this intended & if it is ... is there anyway to have one (bread crumbs) for Docs & lists...

Comments have been disabled for this content.