If you would like to discuss anything, please contact me via email: Howard.Bayliss@sequence.co.uk

Tuesday, January 25, 2011

2 Level Navigation

I wanted to create a mini-sitemap which had the following criteria:
  1. Only show sites
  2. Only show 2 levels of navigation

This article gave me an insight and I was then able to come up with this as the solution:

<SharePoint:AspMenu ID="FooterGlobalNav" runat="server" DataSourceID="GlobalNavDataSourceFooter"
Orientation="Vertical" StaticDisplayLevels="2" MaximumDynamicDisplayLevels="0" UseSimpleRendering="true" />

<publishingnavigation:portalsitemapdatasource id="GlobalNavDataSourceFooter" runat="server"
sitemapprovider="CombinedNavSiteMapProvider" showstartingnode="false" startfromcurrentnode="false"
startingnodeoffset="0" trimnoncurrenttypes="Heading" treatstartingnodeascurrent="true" />

No comments:

Post a Comment