Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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