Easy and Simple SharePoint 2010 Dropdown Navigation bar that works no scripts, no web.config, works on hosted providers
In summary: go to the masterpage and replace this part:
<SharePoint:AspMenu
ID="TopNavigationMenuV4"
Runat="server"
EnableViewState="false"
DataSourceID="topSiteMap"
AccessKey="<%$Resources:wss,navigation_accesskey%>"
UseSimpleRendering="true"
UseSeparateCss="false"
Orientation="Horizontal"
StaticDisplayLevels="2"
MaximumDynamicDisplayLevels="1"
SkipLinkText=""
CssClass="s4-tn"/>
<SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
<Template_Controls>
<asp:SiteMapDataSource
ShowStartingNode="False"
SiteMapProvider="SPNavigationProvider"
id="topSiteMap"
runat="server"
StartingNodeUrl="sid:1002"/>
</Template_Controls>
</SharePoint:DelegateControl>
with this:
<SharePoint:AspMenu
ID="SPSiteMapProvider"
Runat="server"
EnableViewState="false"
DataSourceID="SiteMapDataSource1"
AccessKey="<%$Resources:wss,navigation_accesskey%>"
UseSimpleRendering="true"
UseSeparateCss="false"
Orientation="Horizontal"
StaticDisplayLevels="2"
MaximumDynamicDisplayLevels="3"
SkipLinkText=""
CssClass="s4-tn"/>
<asp:SiteMapDataSource runat="server" ID="SiteMapDataSource1"/>
<SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
<Template_Controls>
<asp:SiteMapDataSource
ShowStartingNode="False"
SiteMapProvider="SPSiteMapProvider"
id="topSiteMap"
runat="server"
StartingNodeUrl="sid:1002"/>
</Template_Controls>
</SharePoint:DelegateControl>
Unfortunately this Navigation provider sort the Items using ASCII order. He don't care about the order defined in the ToNavigationConfiguration interface.So how can I sort the sites anyhow? Just add whitespaces to the title of the Web that you want to be on the first. Example:
Pages with the titles "First", "Second", "Third", "Fourth" and "Fifths" will be shown in this order:
"Fifths", "First", "Fourth", "Second", "Third"
To get them in the right order change the name to this:
" First", " Second", " Third", " Fourth" and "Fifths"
And don't worry the whitespaces are trimmed in both the Navigation and the Page title.
It's not the most elegant way, but it works.
Enjoy and share
Thanks... It was exactly what i was looking for!
AntwortenLöschenI was a little to quick there, I tried it now and I can't get it to save the web title with whitespaces. When I click save the whitespaces are removed??
AntwortenLöschenPlease let me know where you change it and how you are able to save with whitespaces.
Regars Kristian
Hi Krillehbg,
LöschenIf the whitespaces are removed when you create the sub web, then go to the site actions and change the title after creating the web. You can add the whitespaces and they will be kept.
Hi....that don't work in WSS3.0. Any suggestions? All whitespaces are removed when save the title modification.
Löschen