Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Highlight Current Link on Left Navigation

  Asked By: Deon    Date: Mar 02    Category: Sharepoint    Views: 2394

After I have the option "Show Pages" turned off on my Navigation
settings for a publishing site, the left navigation does not highlight
the current link (page or subsite) any more. I checked the HTML code and
it seems the current link does not have the special class name any more.
Is there any way I can re-enable the highlight feature without turning
on "show pages"?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Josie Barron     Answered On: Mar 02

This is the code  I used for the left  nav. Do not understand why the
class ms-selectednav never shows up when the page  is generated.

<Sharepoint:SPNavigationManager

id="QuickLaunchNavigationManager"

runat="server"

QuickLaunchControlId="QuickLaunchMenu"

ContainedControl="QuickLaunch"

EnableViewState="false">

<div>

<SharePoint:DelegateControl runat="server"
ControlId="QuickLaunchDataSource">

<Template_Controls>

<asp:SiteMapDataSource SiteMapProvider="CombinedNavSiteMapProvider"
ShowStartingNode="False" id="QuickLaunchSiteMap"
StartingNodeUrl="sid:1025" runat="server" />

</Template_Controls>

</SharePoint:DelegateControl>

<SharePoint:AspMenu id="QuickLaunchMenu"
DataSourceId="QuickLaunchSiteMap" runat="server" Orientation="Vertical"
StaticDisplayLevels="1" ItemWrap="true" MaximumDynamicDisplayLevels="0"
StaticSubMenuIndent="0" SkipLinkText="">

<LevelMenuItemStyles>

<asp:menuitemstyle CssClass="ms-navheader" />

<asp:menuitemstyle CssClass="ms-navitem" />

</LevelMenuItemStyles>

<LevelSubMenuStyles>

<asp:submenustyle CssClass="ms-navSubMenu1" />

<asp:submenustyle CssClass="ms-navSubMenu2" />
</LevelSubMenuStyles>
<LevelSelectedStyles>

<asp:menuitemstyle CssClass="ms-selectednavheader" /

<asp:menuitemstyle CssClass="ms-selectednav" />
</LevelSelectedStyles>

</SharePoint:AspMenu>

</div>

</Sharepoint:SPNavigationManager>

 
Didn't find what you were looking for? Find more on Highlight Current Link on Left Navigation Or get search suggestion and latest updates.




Tagged: