Monday, December 21, 2009

Enable Breadcrumb Navigation in SharePoint

by Mauro Cardarelli

I've had a few clients ask how to give users a better navigation experience through the various SharePoint pages.  To me, there are two problems... (1) navigating the page hierarchy (i.e. finding your way back to the previous pages without having to use the browser Back button) and (2) navigating to “peer” pages once you find yourself in the right section of the portal.

For peer navigation I often use a simple list web part with all peers defined.  In one case, I created a “tab-like” navigation at the top of the page using HTML (through FrontPage 2003).  It actually worked out very well but is not the easiest thing to scale... you have to use your templates!  For page hierarchies, I recommend breadcrumb navigation.  It is also simple but works well.  There are a few third party web parts available but this also comes with native SharePoint.  Here is how you enable breadcrumb navigation...

1. Open any of the default.aspx pages for an area template. For example, the SPSTOPIC\default.aspx page.  These are located in the SharePoint file collection (i.e. \Program Files\Common Files\...)

2. Locate the following code that renders the page title:

< tr> < td ID="onetidPageTitle" class="ms-pagetitle"> <  SPSWC:CategoryProperty runat="server" Property="Name" />< /td> < /tr>

3. Comment this entry

4. Replace the code with the following:

< tr>< td> < SPSWC:BreadCrumbTrail runat="server" id="BreadCrumbTrail2" TitleLocId=MultiPage_BreadcrumbWebPartTitle VerticalMode = "false" FrameType="None" /> < /td>< /tr>

(remove the spaces I placed after the '<' ... this text editor does weird things with my HTML!)

5. Save  your changes

Published Saturday, July 23, 2005 5:48 AM by Mauro

No comments:

Post a Comment