1

我在 sharepoint 方面完全没有经验,但客户要求我对其 sharepoint 网站进行品牌设计。

我有一个关于顶部导航的问题,看起来像这样:

Home | Staff | IT | Organization 

像这样在 fx IT 上的子项目

Manuals
Protocols

在像吸盘鱼这样的下拉菜单中

有一个主入口页面和三个办公页面

在树视图中,它将如下所示:

Main
  - Office 1
    - Staff
    - IT
      - Manuals
      - Protocols
    - Organization
  - Office 2
    - Staff
    - IT
      - Manuals
      - Protocols
    - Organization
  - Office 3
    - Staff
    - IT
      - Manuals
      - Protocols
    - Organization

我怎样才能实现这个特定的要求?我是否需要在子页面上为下拉菜单创建子页面和子页面,还是有其他方法。

4

2 回答 2

1

首先转到站点设置>>导航(在外观下)根据需要添加/删除“全局导航”下的链接

其次编辑您的母版页并添加以下内容

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



    <SharePoint:AspMenu ID="TopNavigationMenuV1" EncodeTitle="false" Runat="server" EnableViewState="false" DataSourceID="topSiteMap" AccessKey="<%$Resources:wss,navigation_accesskey%>" UseSimpleRendering="true" UseSeparateCss="false" Orientation="Horizontal" StaticDisplayLevels="2" MaximumDynamicDisplayLevels="4" SkipLinkText="">

您可以根据需要使用这些属性

于 2013-01-08T12:57:54.333 回答
1

SharePoint handles the rendering of navigation for you, assuming that you want SharePoint to manage your navigation bar. There are quite a few caveats to allowing SharePoint to manage your navigation if you intent to brand it, mainly in how you set up your site structure. When it comes to branding, the primary problem you are going to encounter is that by default most of your primary static links (Staff, It and Organization) in your example will actually be on the second level in your nav list.

<ul>
    <li><a href=”#”&gt;Home</a>
    <ul>
        <li><a href=”#”&gt;Staff</a></li>
        <li><a href=”#”&gt;IT</a></li>
        <li><a href=”#”&gt; Organization </a></li>
    </ul>
    </li>
</ul>

SharePoint also adds a bunch of divs and classes that may cause something like SuckerFish issues. Most nav plugins I have worked with will attempt to hide any non-toplevel list items, so your nav bar would only show "Home" and not the rest, not exactly good.

The easiest way around this is to use static navigation. Update your custom master page with your own list for navigation, applying the proper class for whatnot for suckerfish and you get good to go. Problem is that you now have to update your master page each time you want to change your nav.

Next option is to use jquery to parse SharePoint’s rendering of your navigation, rebuild it in a suckerfish friendly way, and finally let suckerfish markup this. We have used this for quite a few customers because it’s quick and easy. You are throwing all of the heavy lifting to the client, and depending on how you build your html,css and js, there may be a flicker when the nav is being updated.

Third, the sledgehammer approach, hack the css and use jquery to add suckerfish like effects to your OOTB SP navigation. It is not the difficult although I do not find this elegent.

Fourth, create your own navigation web part that will render your sitemap in a way that you like. This would require knowledge of SharePoint and how to build a solid app. I would only recommend this for developers that are experienced with SharePoint.

I understand the desire to learn how to work with SharePoint, we all started with a request to branding SP for the first time from someone. The issue is that branding SharePoint is a very different skill than building a general site, modifying Joomla, WordPress, etc. You might find it much quicker to work with company that has the experience and knowledge of branding SharePoint so that it is done correctly. You could then use this knowledge for your next SP request.

I hope this helps.

于 2013-01-10T20:10:18.327 回答