I needed to customize the top link bar in 3
You can easily do this in 2 levels through bro
Steps:
1. You need to create a custom site map
Save this file as ‘sitemap.xml’ in
This is the datasource file for the navigati
2. Open the site in sharppoint Design
Replace the SharePoint:DelegateControl……… /SharePoint:DelegateControl with your own data source. Use following code to define the datasource.
asp:XmlDataSource DataFile="/_layouts/toplinknavigation/SiteMap.xml" ID="TsetXmlDataSource" runat="server" XPath="/*/*" /
This will link the data source you created in layouts directory.
3. After CssClass="s4-tn" add the following data binding
DataBindings>
asp:MenuItemBinding Depth="0" DataMember="siteMapNode" NavigateUrlField="url" TextField="title" ToolTipField="description" ValueField="title" />
asp:MenuItemBinding Depth="1" DataMember="siteMapNode" NavigateUrlField="url" TextField="title" ToolTipField="description" ValueField="title" />
asp:MenuItemBinding Depth="2" DataMember="siteMapNode" NavigateUrlField="url" TextField="title" ToolTipField="description" ValueField="title" />
/DataBindings>
And end with /SharePoint:AspMenu>
4. Finally change the DataSourceID of SharePoint:AspMenu>
To TsetXmlDataSource
Save the changes and test the site in the browser. You may get an exception saying ‘safe control…..etc.etc’. to resolve this go to web.config change Safe=”True” in
SafeControl Assembly= "System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" tag.
Done.
This comment has been removed by the author.
ReplyDeleteActually that worked with me just by going to the master page and adding a new level in the ASP Control 'SharePoint:AspMenu':
ReplyDeleteStaticDisplayLevels="2"
MaximumDynamicDisplayLevels="6"
And choosing in the Site Navigation Settings (With Publishing Infrastructure activated) to show subsites:)