0

I have created a custom page layout with 3 zones. The left zone has uses the following code to render the navigation. (Managed navigation).

<SharePoint:SPNavigationManager id="ContentPageNavigationManager" runat="server" QuickLaunchControlId="ContentPageQuickLaunchMenu"  
                        ContainedControl="QuickLaunch"
                        EnableViewState="false">
                            <asp:SiteMapDataSource SiteMapProvider="CurrentNavigationTaxonomyProvider" ShowStartingNode="True" id="ContentPageQuickLaunchSiteMap" StartingNodeUrl="sid:1025" runat="server" />
                            <SharePointWebControls:AspMenu id="ContentPageQuickLaunchMenu" runat="server" EnableViewState="false" DataSourceId="ContentPageQuickLaunchSiteMap" UseSimpleRendering="true" Orientation="Vertical" StaticDisplayLevels="3" AdjustForShowStartingNode="true" MaximumDynamicDisplayLevels="0" SkipLinkText="" />
                        </SharePoint:SPNavigationManager>

I want to highlight the current page in quick launch navigation but at present it defaults to the first item in navigation menu. I want to highlight "complete a timesheet" on left nav but it defaults to first item...

not sure which property in AspMenu control that sets this value.

enter image description here

0

I couldn't find any option in the webcontrols that could highlight the current page. I used JQuery selector to apply style as shown below. Solution very specific to my scenario...

$('.ms-core-listMenu-verticalBox .ms-core-listMenu-root > li > ul > li > ul > li.selected').css("background-color","#CEEDF9");
  • where did nyou place this code? inside master page? – john Gu Feb 21 '18 at 13:54

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.