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

I have created a new SharePoint web site, but I am having an issue getting the navigation to work as per the project requirements.

The client wants the navigation to show on the first level of navigation (side nav), then when you click on one of the links it will expose the next layer of navigation, but still show the previous layer. Once you click on another sub heading it exposes the next layer, but still displays the previous layers as well.

here's an example from another site of the general concept which we are looking for:

navigation example

Here is the navigation provider I am using for my side nav in my page layout:

<PublishingNavigation:PortalSiteMapDataSource
            ID="SiteMapDS"
            runat="server"
            EnableViewState="false"
            SiteMapProvider="CurrentNavigation"
            StartFromCurrentNode="true"
            StartingNodeOffset="0"
            ShowStartingNode="false"
            TrimNonCurrentTypes="Heading"/>         
        <SharePoint:AspMenu
            ID="CurrentNav"
            EncodeTitle="false"
            runat="server"
            EnableViewState="false"
            DataSourceID="SiteMapDS"
            UseSeparateCSS="false"
            UseSimpleRendering="true"
            Orientation="Vertical"
            StaticDisplayLevels="4"
            MaximumDynamicDisplayLevels="0"
            CssClass="s4-ql" 
            SkipLinkText="<%$Resources:cms,masterpages_skiplinktext%>"/>

Does anyone have any ideas where I can go from here?

Thanks!

share|improve this question
add comment

2 Answers 2


I did some testing on this and your code seems to be fine, related to what Nodes the Menu will render. If I got it right, what you want to do is use the "Current Navigation" provider, and you want it to show all the parent levels as well as the children.

So, in order to work as in the image you provided, there are 2 things that should be done:

. On the child sites, go to 'Site Settings -> Navigation' and set "Display the same navigation items as the parent site", and enable "Show Pages".
This way, the top level will be shown on child sites, and the children pages will be shown as well.

. Apply CSS to the elements rendered by the ASP Menu to match the styling provided in the image.

Happy coding!

share|improve this answer
add comment

You can try out the OOTB tree view which comes with quick launch navigation menu. But I am not quite sure, how well it would suit your current scenario.

If you need custom styles and animated effects, its always better to go for JQuery and CSS styling that can make your site the way you need. In any case, you wont require to do any modification for the navigation provider, since we are only styling the data that is already present.

Good Luck ...

share|improve this answer
add comment

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.