Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I created on publishing site. Now I want to add menu bar over there. But publishing site doesn't contain menu bar by default. How to add this into publishing site. I tried to add from v4.master page but failed. Could you please tell me the way to do it? I want to display following items in publishing site. Menu items in the following image are in vertical. But i want to convert them into horizontal or just like team site menu items. How to achieve? enter image description here

share|improve this question
add comment

3 Answers 3

up vote 2 down vote accepted

Sorry Mihir I misread, you need to look at the MSDN real world branding post.

Code from MSDN:

<div class="customTopNavHolder">
<PublishingNavigation:PortalSiteMapDataSource
  ID="topSiteMap"
  runat="server"
  EnableViewState="false"
  SiteMapProvider="GlobalNavigation"
  StartFromCurrentNode="true"
  StartingNodeOffset="0"
  ShowStartingNode="false"
  TrimNonCurrentTypes="Heading"/>

 <SharePoint:AspMenu
   ID="TopNavigationMenuV4"
   Runat="server"
   EnableViewState="false"
   DataSourceID="topSiteMap"
   AccessKey="<%$Resources:wss,navigation_accesskey%>"
   UseSimpleRendering="true"
   UseSeparateCss="false"
   Orientation="Horizontal"
   StaticDisplayLevels="1"
   MaximumDynamicDisplayLevels="1" 
   SkipLinkText=""
   CssClass="s4-tn">
 </SharePoint:AspMenu> 
</div>
share|improve this answer
    
Thank you so much... really Useful link what you provided. Great brother... –  Mihir Nov 2 '12 at 13:29
add comment

I have tried your same scenario in local machine, and i got solution. You may be editing existing AspMenu from nightandday.master reference master file.

But you need to add some code for Global menu:

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

After that you can make visible false to your current asp menu which is vertical if you dont need.

Hope it is useful to you. let me know if you still getting any issue.

share|improve this answer
add comment

I think, you are using Publishing site so using nightandday.master file as master page. which does not contain sharepoint menu by default. but yes, you can inject by customizing code like:

<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"/>
share|improve this answer
    
Yeah I tried with this one. But it is saying topsitemap is not exist. That topsitemap also i copied and pasted.. but not working properly –  Mihir Nov 2 '12 at 13:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.