Skip to content

Instantly share code, notes, and snippets.

@jjaramillo
Created June 22, 2014 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjaramillo/28be2bd970a7490ddd70 to your computer and use it in GitHub Desktop.
Save jjaramillo/28be2bd970a7490ddd70 to your computer and use it in GitHub Desktop.
Just put this inside a web scope feature and say goodbye to the top navigation root node...
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Control
Sequence="50"
Id="TopNavigationDataSource"
ControlClass="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapDataSourceSwitch"
ControlAssembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<Property Name="ID">topSiteMap</Property>
<Property Name="SiteMapProvider">GlobalNavigation</Property>
<Property Name="EnableViewState">false</Property>
<Property Name="StartFromCurrentNode">true</Property>
<Property Name="ShowStartingNode">false</Property>
<Property Name="TreatStartingNodeAsCurrent">true</Property>
<Property Name="TrimNonCurrentTypes">Heading</Property>
</Control>
</Elements>
Copy link

ghost commented Jul 10, 2015

Hi, I'm a little confused, but would really like some help on this. Do I have to create a new feature to do this, or is this something I can add to an existing feature or how does this work. Sorry for the ignorance, but Ive only installed features in the past, never had to modify one.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment