1

At my site I am using term store metadata navigation for left navigation panel. The problem is - when I have navigated to "Level 1.2.1", I want to show parent of this level (like in example below).

()Root
  () Level 1
    () Level 1.1
    () Level 1.2   <-- I want to show this either
      () Level 1.2.1  <-- I can show this
      () Level 1.2.2  <-- I am here
      () Level 1.2.3  <-- I can show this
   () Level 2

Right now I can show siblings of current term - for example, if I am at "Level 1.2.2", I can see 1.2.1 and 1.2.3, but I need to show 1.2 ! I want to avoid breadcrumb, so that showing parent term would be a possibility to navigate through site.

Navigation is coded in layout page:

<SharePoint:SPNavigationManager
ID="QuickLaunchNavigationManager"
runat="server"
QuickLaunchControlId="V4QuickLaunchMenu"
ContainedControl="QuickLaunch"
EnableViewState="False">
<SharePoint:DelegateControl runat="server" ControlId="QuickLaunchDataSource">
    <Template_Controls>
        <asp:SiteMapDataSource
             SiteMapProvider="SPNavigationProvider" 
             ID="QuickLaunchSiteMap" 
             runat="server" 
             EnableViewState="False" 
             ShowStartingNode="True" 
             StartFromCurrentNode="False" 
             StartingNodeOffset="-1" />
    </Template_Controls>
</SharePoint:DelegateControl>
<SharePoint:AspMenu 
    Width="100%" 
    CssClass="sidebar" 
    ID="V4QuickLaunchMenu" 
    runat="server" 
    EnableViewState="False" 
    DataSourceID="QuickLaunchSiteMap" 
    UseSimpleRendering="true" 
    Orientation="Vertical" 
    StaticDisplayLevels="3" 
    RenderingMode="List" 
    AdjustForShowStartingNode="true" 
    MaximumDynamicDisplayLevels="0" 
    SkipLinkText="">
</SharePoint:AspMenu>

1 Answer 1

3

Recently I found solution for this problem by myself.

Problem was with attribute ControlId="QuickLaunchDataSource", that was overriding part of my attributes in SiteMapDataSource.

ControlId is a part of navigation feature,that stores settings in NavigationSiteSettings.xml

It is located in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES\Navigation

In my case, I removed reference ControlId="QuickLaunchDataSource" from DelegateControl and updated my SiteMapDataSouce code block:

<asp:SiteMapDataSource
  SiteMapProvider="GlobalNavigationTaxonomyProvider" 
  ID="QuickLaunchSiteMap" 
  runat="server" 
  EnableViewState="False"  
  ShowStartingNode="True" 
  StartFromCurrentNode="False" 
  StartingNodeOffset="1"  />
2
  • Could you please provide the source for the whole SPNavigationManager? Commented Sep 8, 2015 at 10:57
  • 1
    Whole SPNavigationManager tag code is showed in post. There are only two changes : removed reference ControlId="QuickLaunchDataSource" from DelegateControl tag and updated SiteMapDataSouce tag - SiteMapProvider="GlobalNavigationTaxonomyProvider". Commented Sep 8, 2015 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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