Microsoft Content Management Server - Navigation in MOSS 2007

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > April 2007 > Navigation in MOSS 2007





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Navigation in MOSS 2007
Mike Parris

2007-04-25, 7:17 am

How do I create a navigation control in MOSS2007 that shows pages as well as
sites?

I have tried a PortalSiteMapDataSource bound to an aspmenu, but it only
shows sites, no pages. Here's my code -

< PublishingNavigation:PortalSiteMapDataSo
urce ID="GlobalNavDataSource1"
Runat="server" SiteMapProvider="CombinedNavSiteMapProvider"
ShowStartingNode="false" StartFromCurrentNode="true"
StartingNodeOffset="0" TrimNonCurrentTypes="Heading"
TreatStartingNodeAsCurrent="true" />
<SharePoint:AspMenu ID="GlobalNav1" Runat="server"
DataSourceID="GlobalNavDataSource1" Orientation="Vertical"
StaticDisplayLevels="4" MaximumDynamicDisplayLevels="0"
Font-Size="Smaller" Font-Names="Arial">
</SharePoint:AspMenu>



I have also tried, and this is the way I really want to go, building a user
control based on the PortalSiteMapProvider.
I have set the provider to include pages using -
_provider.IncludePages = PortalSiteMapProvider.IncludeOption.Always;
I am getting the child nodes using -
SiteMapNodeCollection nodes =
_provider.GetChildNodes(startingNode,
Microsoft.SharePoint.Publishing.NodeTypes.All,
Microsoft.SharePoint.Publishing.NodeTypes.All);
However, the nodes collection only contains site objects, no pages.

Are there any properties that I need to set to get page information?





Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com