【问题标题】:Hide lists from "All Site Content" page of SharePoint site从 SharePoint 网站的“所有网站内容”页面隐藏列表
【发布时间】:2009-08-01 01:00:19
【问题描述】:

我想知道是否有一种方法可以隐藏用户导航到 SharePoint 中的“所有网站内容”页面时显示的某些文档库列表,并且我想知道是否有一种编程方式来实现这一点。 (如果可能,使用 WSS)。

我需要从这个视图中隐藏许多列表,这些列表将通过链接列表中的链接访问(这个链接列表是我希望用户看到的唯一)。

我们将不胜感激。

【问题讨论】:

  • 您询问的是哪个版本的 WSS?

标签: sharepoint sharepoint-2007 list sharepoint-2003


【解决方案1】:

SPList 类有一个 Hidden 属性,可以完全按照您的要求进行操作。

简而言之,你可以这样做:

1. Open the Site collection (SPSite)
2. Enumerate throuh all sites (SPSite.AllWebs -> SPWeb)
3. Enumerate through all lists (SPWeb.Lists)
4. Locate the lists you want to hide (base on Title or other property)
5. Set the Hidden Property to true
6. Call SPList.Update() (important!)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-03-04
    • 1970-01-01
    • 1970-01-01
    • 2010-11-16
    • 1970-01-01
    • 2013-03-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多