Saturday, November 13, 2010

Hide First Tab in SP 2010 Navigation

My original article used CSS to hide the first navigation tab, but if you want to make the change via the master page navigation control there are some simple changes that you will need to make. I originally thought by just changing the “ShowStartingNode” property it would simply hide the first node but by default it has it already set to false: ShowStartingNode="False" so the approach below is what worked for me.

Here is the base top navigation control:
" br=""> UseSimpleRendering="true"
UseSeparateCss="false"
Orientation="Horizontal"
StaticDisplayLevels="2"
MaximumDynamicDisplayLevels="1"
SkipLinkText=""
CssClass="s4-tn"/>





ShowStartingNode="False"
SiteMapProvider="SPNavigationProvider"
id="topSiteMap"
runat="server"
And then make the following changes to the static, dynamic and site map provider:
ID="TopNavigationMenuV4"
Runat="server"
EnableViewState="false"
DataSourceID="topSiteMap"
AccessKey="<%$Resources:wss,navigation_accesskey%>"
UseSimpleRendering="true"
UseSeparateCss="false"
Orientation="Horizontal"
StaticDisplayLevels="1"
MaximumDynamicDisplayLevels="2"
SkipLinkText=""
CssClass="s4-tn"/>
ShowStartingNode="False"
SiteMapProvider="CombinedNavSiteMapProvider"
id="topSiteMap"
runat="server"/>

The result would look something like this:


1 comment:

  1. Ezifun health care plans will help you find your Health Fitness ,our health care tips will give you energy and vitality.

    ReplyDelete