Skip to content

Instantly share code, notes, and snippets.

@jjaramillo

jjaramillo/Elements.xml Secret

Created Jun 22, 2014
Embed
What would you like to do?
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>
@ghost

This comment has been minimized.

Copy link

@ghost 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