开发者

Navigation menu URLs customization

开发者 https://www.devze.com 2023-01-12 20:43 出处:网络
I have existing Sharepoint 2010 website with the below code in master page for navigation menu: <PublishingNavigation:PortalSiteMapDataSource

I have existing Sharepoint 2010 website with the below code in master page for navigation menu:

    <PublishingNavigation:PortalSiteMapDataSource 
            ID="topSiteMap" 
            runat="server" 
            EnableViewState="false" 
            SiteMapProvider="CombinedNavSiteMapProvider" 
            StartFromCurrentNode="true" 
            StartingNodeOffset="0" 
            ShowStartingNode="true" 
            TrimNonCurrentTypes="Heading"/> 
    <SharePoint:AspMenu开发者_C百科 
            ID="TopNavigationMenuV4" 
            Runat="server" 
            EnableViewState="false" 
            DataSourceID="topSiteMap" 
            UseSimpleRendering="true" 
            UseSeparateCss="false" 
            Orientation="Horizontal" 
            StaticDisplayLevels="2" 
            MaximumDynamicDisplayLevels="2" 
            SkipLinkText="" 
            CssClass="s4-tn"> 
    </SharePoint:AspMenu> 

It renders menu items with hyper-links like below (hyper-link is not including a web page):

<a class="static dynamic-children menu-item" href="/products">

This causes unwanted server redirect when user clicks a menu item. How can I make all menu item hyper-links to end with "default.aspx" (like below)?

<a class="static dynamic-children menu-item" href="/products/default.aspx"> 

Thanks, Boris


create a custom sitemapprovider ;)

How come you get unwanted redirects? Are the homepages of the sites set to default.aspx?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号