
Working with Navigation in Master Pages
❘
161
UseSimpleRendering=”true”
UseSeparateCss=”false”
Orientation=”Horizontal”
StaticDisplayLevels=”2”
MaximumDynamicDisplayLevels=”1”
SkipLinkText=”“
CssClass=”s4-tn”/>
The following list describes some of the more important properties for the AspMenu control:
DataSourceID
➤
— Sets the ID of the data source that the navigation will use. This date source
is defi ned somewhere in the master page as either an
<asp:SiteMapDataSource> or a
<PublishingNavigation:PortalSiteMapDataSource>. This data source in turn will
reference a site map provider as described earlier in the chapter.
UseSimpleRendering
➤
— Controls whether the navigation will use simple rendering or not.
When set to
True, the navigation will use an HTML unordered list and CSS hover states for
a more modern rendering. When set to
False, the navigation will use the old SharePoint
2007 rendering method of nested tables with JavaScript. You will learn more about this
property momentarily.
Orientation
➤
— Controls whether the navigation will be rendered horizontally or vertically
StaticDisplayLevels
➤
— Controls how many levels of navigation are shown by default. For
example, setting this to
2 would cause SharePoint to show navigation items for the current
site and the subsites directly underneath it.
MaximumDynamicDisplayLevels
➤
— Unlike StaticDisplayLevels, this controls how
many levels ...