User519337647 posted
Displaying just the right levels of the menu requires coordination between the menu control, the SiteMapDataSource, and your web.sitemap.
First, static display levels refer to the levels you can see just looking at the page. The dynamic levels are the ones that you would see as drop-down items when you mouse over their static "parent."
If you had a web.sitemap like this:
<?xml
version="1.0"
encoding="utf-8" ?><siteMap
xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0"
>
<
siteMapNode
url="~/"
title="Home"
description="">
<
siteMapNode
url="~/about.aspx"
title="About Us"
description="" >
<siteMapNode
url="~/ourteam.aspx"
title="Meet Our Team"
description="" />
</siteMapNode>
<
siteMapNode
url="~/contact.aspx"
title="Contact Us"
description="" />
</
siteMapNode>
</
siteMap>
...then then there are three levels to the sitemap, the home page on the first, about and contact on the second, and ourteam on the third, as a "child" of about.
If you wanted to see home, about, and contact, and nothing else, you could set the following:
On the SiteMapDataSource:
ShowStartingNode="True" (this is a default actually and you would not have to set it)
On the Menu control:
StaticDisplayLevels
="2"
MaximumDynamicDisplayLevels="0"
I think those settings alone would make it work that way. Hopefully this simple example explains a little. If you want to, you could post the markup of your menu, sitemapdatasource, and web.sitemap
and I could offer more relevant descriptions.
Maybe try this tutorial for a more complete discussion:
http://msconline.maconstate.edu/tutorials/ASPNET20/default.htm. Scroll down to section 12 to find the menu control info