Archives

Archives / 2006 / May
  • SharePoint 2007 navigation dissected – part 1

    One of the areas SharePoint 2003 was suboptimal was site navigation. SPS 2003 has some quite restrictive navigation functionality to navigate through the portal areas. When you end up in a team site you only have your quick links bar at the left side to navigate to lists and libraries within your site, but there is no way to navigate to your sub sites.

    As always the next version will solve all our problems… so let’s have a look at the new and improved, but still beta 2, SharePoint 2007 standard navigation options. I’m working with an out-of-the-box SharePoint installation that includes the portal.

    First thing I did was creating a set of sites and sub sites under the site Sites of type Site Directory with the following structure:

    site1
                    site1sub1
                                    site1sub1subA
                                    site1sub1subB
                    site1sub2
                                    site1sub2subA
                                    site1sub2subB
    site2
                    site2sub1
                                    site2sub1subA
                                    site2sub1subB
                    site2sub2
                                    site2sub2subA
                                    site2sub2subB

     

    This results in the following homepage navigation:

    As you can see, two levels of navigation are displayed.

    Navigation Inheritance

    When a site is created you are prompted with the following option:

    The default setting for this option is Yes. I created site1 and site2 using the Yes setting, and a site3 using the No setting. The results are as follows:

    For site2 (use the top link bar from the parent site):

    For site3 (don’t use the top link bar from the parent site):

    I can see no difference between the two options, both shows their complete path in the breadcrumb bar:

    Home > Sites > site2 > Pages > Home

    Home > Sites > site3 > Pages > Home

    For site3 I actually expected to see:

    Site3 > Pages > Home

    Another strange thing is that I didn’t find an option in the UI with the same phrasing to modify this setting after initial creation of the site. This option can be set in a working way however, keep on reading!

    Site navigation

    If you navigate to Sites you get the following navigation:

    So all sub sites are displayed, with one level of the sub-sub sites.

    If you navigate from here to site2 you get the following navigation:

    This is a different navigation. The current site (site2) is displayed with one level of children (site2sub1, site2sub2), and sites at the same level (site1, site2).

    The question now is: what configures the navigation? If you go to Site Actions >Site Settings >Modify Navigation you get to the Site Navigation Settings.

    The Site Navigation Settings screen looks as follows:

    This screen asks for some experiments!

    Site Navigation Settings

    The Site Navigation Settings screen gives us some configuration options on how navigation works on a site. Lets start with the following options:

    Global Navigation: Use global navigation of the parent site or of this site.

    Current Navigation: Use navigation items of the parent site or of this site. If this site is selected, you can enable to show siblings of this site in the current navigation.

    For the site site1sub1 we go through the different possibilities.

    Global navigation: global navigation of parent

    We see three elements on the above screenshot:

    1.       At the top the path of the root site who’s navigation is used is displayed (empty, the root site)

    2.       The complete parent navigation bar is displayed

    3.       The complete path to the parent sites is displayed

    Global navigation: global navigation of this site

    We see three elements on the above screenshot:

    1.       At the top the path of the root site who’s navigation is used is displayed: site1sub1

    2.       The navigation bar of the current site + it’s sub sites is displayed

    3.       The complete breadcrumb path to the parent sites is displayed

    I created two additional sub sites under site1sub1subA: site1sub1subAsubX and site1sub1subAsubY. Note that these sites become available in a drop down box in the global navigation bar (2):

     

    But what happens if we have set global navigation of the parent site on a site, but a site somewhere up the path has set its global navigation to this site.

    In the above example site site1sub1  has set its global navigation to this site, while site1sub1subA and site1sub1subAsubX have set their global navigation of the parent site. If we now go to the site site1sub1subAsubX we see the following navigation:

    The result is that a site goes up to the hierarchy to the first parent site, and displays its navigation with respect to this parent site!

    Current navigation: use navigation items from the parent site

    We are at site site1sub1. This site is highlighted in the left hand navigation structure. We see the parent site, and all sites at the same level as the parent site. Under the parent site we see the current site (highlighted), and all sites at the same level.

    Current navigation: use navigation items from this site

    We are at site site1sub1. This site is not visible in the left hand navigation structure, the current location can be determined from the site title, the global navigation, and the breadcrumb path as shown in the picture below. We see all sub sites with their sub-sub sites (2 levels).

    Current navigation: use navigation items from this site, show siblings

    We are at site site1sub1. This site is visible in the left hand navigation structure (but not highlighted), We see the sub sites of the current site, and all sibling sites (sites at the same level as the current site), but without their sub sites.

    Showing pages in the navigation

    Besides sub sites a site can contain pages. It is possible to display these pages in the left hand navigation:

    The pages of site1sub1 are displayed in the left hand navigation. Note that the “Home” page is not displayed in this navigation. If we navigate to a page available in the navigation this page gets highlighted in the left hand navigation:

    I did not find a way to make the “Home” page (Pages/default.aspx) part of the left hand navigation.

    Note that the pages are always displayed in the breadcrumb trail.

    Conclusion

    SharePoint 2007 contains a very powerful navigation system that allows you to completely configure the way your site navigation is presented. I did only scratch the surface however. In a upcoming posts I will dive into the following topics:

    Navigation Editing and Sorting – this functionality allows you to add custom additional navigation items and to show or hide sites and pages in the navigation (but not the default page in the Pages library!)

    Navigation under the hood – which navigation controls are used by SharePoint, what are their possibilities and how can you for example change the current depth of 2 that is currently shown in the hierarchy.

    Custom navigation providers – how can you utilize the SharePoint navigation controls with custom navigation information?

    Any feedback is highly appreciated!

  • Microsoft goes Social Networking on SharePoint

    In the last week conference a new part of the ShaerPoint family was announced: Knowledge Network.

    To say it in Microsoft own words:

    Knowledge Network for Microsoft® Office SharePoint® Server 2007
    Knowledge Network for Microsoft® Office SharePoint® Server 2007 is software for enterprise search and social networking that helps users collaborate more effectively by automating the discovery and sharing of previously undocumented information and relationships. Knowledge Network enhances Office SharePoint Server 2007 by adding the ability to search for who knows whom and who knows what in an organization.

    You can use Knowledge Network to do the following:

    • Find people who have expertise in a subject
    • Find people who can help you connect with someone else
    • Find people who have contacts at a specific company or organization
    • Find out who and what you have in common with others

    Knowledge Network is composed of two components, a client-side and a server-side. The client-side component analyzes emails at a local level searching for keywords and contacts and creates automated profiles for each member who joins the network. Each member in the Knowledge Network controls their information at a local level, deciding which information they share with others in the network, so personal information stays private. The server-side component, hosted within Office SharePoint Server 2007, aggregates and indexes profiles across the enterprise. Together, the client and server modules enhance the SharePoint 2007 platform with powerful social networking capabilities.

    De software is now available for download on Microsoft Betaplace.

    There is a blog on Knowledge Network from the development team: http://blogs.msdn.com/kn/.

     

    Other blog entries to have a look at:

    http://www.joiningdots.net/blog/2006/05/ms-knowledge-network.html

    http://craigrandall.net/archives/2006/05/knowledge-network/ 

    I wonder is the client software that analyzes your mail is the Snarf application from Microsoft Research.

  • NAnt, devenv.com and devenv.exe

    In NAnt there is a solution task that works for VS.NET 2003, but not for VS.NET 2005. I needed to build a VS.NET 2005 solution from NAnt, so devenv.exe to the rescue: devenv.exe mysolution.sln /build Debug. Problem was that I did not get any output from the build process, not even if there were errors. A non 0 value was returned in case of errors, but I’m integrating with CruiseControl.Net (ccnet) and want my compilation output from the buildserver in case of errors. After some digging aand Googling I found the solution. Don’t use devenv.exe, but devenv.com and you get your output!!

  • Add item to SharePoint list but returning to another location

    Brad asked me for a solution to the following scenario:

    I have two WSS sites -
    - Site A is a project site for all project team members
    - Site B is an issue capture and resolution site for three project issue trouble shooters.

    Question: How can I call the newitem.aspx, located in Site B - Issues webpart from a link on Site A so that the newitem.aspx form pops up and the Site A users can fill it out. When they click the submit button, they return to Site A?

    In other words, SIte A users only need to fill out the issues form. Site B users collect the issues and work them to resolution. My requirement is that Site B issues should be worked and reviewed on Site B, not on Site A.

    This can be resolved using the Source parameter on the url of newitem.aspx:

    You can add Source=xxx on the url, so:
     
    ../../../AddItem.aspx?Source=http%3A%2F%2Fwww%2Egoogle%2Ecom
     
    Note the encoding!!!
     
    After filling out the item, it will bring you back to the specified URL.
     
    UPDATE: NOTE THE CASING OF THE Source PARAMETER, FIRST ‘S’ MUST BE CAPITAL!!
  • Execute your custom code after instantiating a SharePoint site based on a Site Definition using ExecuteURL

    Sometimes you know you can do something, but are completely forgotten how. This is a kind of post to self, so if I search for it again, I will end up on my own blog again. This actually happens 80% of the time when I search for something on SharePoint;-).

    When you have a Site Definition, but want to execute code after a site is instantited based on the Site Definition (a first time run after creation), you can add a CAML tag ExecuteURL to your Site Definition that points to an ASPX page in the _layouts directory. This tag must be placed in the ONET.XML file for the Site Definition, in the Configuration section.

    In this page you can do things like applying a theme, creation of Site Groups, add users to these groups, or even start an interactive session with the user to request aditional information.

    The documentation can be found here in the SharePoint SDK.