We have a menu and want to show only the submenus. We tried all combinations of StartingNodeOffset and ShowStartingNode=false with no success.

Any ideas?


ShowStartingNode works fine to do what you want. The problem proably is, that you are not using the SiteMapDataSource you think you are using :-)

Depending on the site/web template you are using, navigation features can override the data source defined in the master page. If you look carefully, you will see that the top navigation data source in v4.master is placed inside a delegate control. The (hidden) navigation feature used in publishing pages will override the control specified in the master page, and also set different parameters regarding the data source and the underlying sitemap provider.

If you are already creating a new master page, you could edit the master, removing the delegate control. This makes it more obvious what data source is used, but you loose the flexibility of being able to override the data source in your own delegate control for certain sites.

Another more elegant approach is to create your own delegate control in a feature, giving it a low sequence number to make it override any other features.

If you are about to create your own site definition template, you can also define the navigation settings inside your web template section as feature parameters. Check out the existing publishing templates to see how it is defined in the ONET.XML file.

Read more on delegate controls here. Also read this excellent article by Chris O'Brien

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.