惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - an_andy

MOSS 2007定制开发培训 Soft Skill MOSS 2007: Implementing a custom Navigation MOSS2007 - Microsoft Release sample Master Pages 招聘SharePoint Developer Office System 2007 update Office 2007 Beta2 Downloads WinFX SharePoint Search 文档管理[权限] GetUserProfilerWebPart 设计文档 Enterprise Library SQL Server Reporting Services 从应用程序生成用户友好的报表 Live Communications Server 2005 sp1 发布 Portal 个性登录页 显示wss图片库:速度 基于sharepoint 2003的内容管理1.0 Single Sing-On 单点登录 Visual Studio Tools For Office "v3" - March Community Technology Preview [CTP]
Customizing the Quick Launch menu: Adding fly-out menus to SharePoint navigation
an_andy · 2007-04-28 · via 博客园 - an_andy

come from SharePoint Team Blog

In this post, I’ll show you how to customize the Quick Launch menu to display several levels of data in a dynamic way and use this customized menu for quick access to all Views within a List without consuming space on the Quick Launch.

First, let’s add a List and make sure it shows on the Quick Launch. Let’s call this list “Navigation Test List”, and then add 4 Views to the list.

Next, let’s write some OM code that, when run, adds a link to each of the List’s Views under the List Link on the Quick Launch. Add the following code to a new C# Console Application in Visual Studio .NET or 2005 (and don’t forget to add a reference to Microsoft.Sharepoint.dll).

using System;

using System.Collections.Generic;

using System.Text;

using Microsoft.SharePoint;

using Microsoft.SharePoint.Navigation;

namespace ConsoleApplication1

{

    class Program

    {

        static void Main(string[] args)

        {

            SPSite site = new SPSite("http://server");

            SPWeb web = site.OpenWeb();

            SPList list = web.Lists["Navigation Test List"];

            SPNavigationNode rootListLink = web.Navigation.GetNodeByUrl(list.DefaultViewUrl);

            SPNavigationNode node = null;

            foreach (SPView view in list.Views)

            {

                node = new SPNavigationNode(view.Title, view.Url, false);

                rootListLink.Children.AddAsFirst(node);

            }

        }

    }

}

At this point, we have links to all of the Views under the List, but they cannot be displayed since the menu control ignores the links after the second level. So, let’s modify the menu control to display what we want. Perform the following to accomplish this task:

1.     Navigate to the master page gallery: From the home page click on Site Actions, then Site Settings, and then on Master Pages, under the Galleries column

2.     Click on the drop down menu for the master page you want to modify, and then click on Edit in Microsoft Office SharePoint Designer

3.     Locate the Quick Launch Menu control, and modify the StaticDisplayLevels and MaximumDynamicDisplayLevels attributes:

                     <SharePoint:AspMenu

                            id="QuickLaunchMenu"

                            DataSourceId="QuickLaunchSiteMap"

                            runat="server"

                            Orientation="Vertical"

                            StaticDisplayLevels="2"

                            ItemWrap="true"

                            MaximumDynamicDisplayLevels="1"

                            StaticSubMenuIndent="0"

                            SkipLinkText="">

4.     Save your changes and reload the page from the browser. Hover over the Links on the Quick Launch. The end result should look like this:

5.     Optional: Modify other properties in the menu control to match the look and feel of your site. The above steps can also be applied to the Top Link Bar.

Useful Links:

·         On MSDN, How to: Customize the Display of Quick Launch.