Tip

Creating a SharePoint site map using out-of-the-box features

Giving SharePoint site owners the power to manage their own part of the SharePoint site map frees up administrators to manage more critical areas of the SharePoint environment.

As the scope and user community grow for SharePoint, so does its intricacies. One complex problem for SharePoint administrators is how to maintain a clean site map.

Out-of-the-box SharePoint provides a kind of site map known as the Site Directory. This type of site directory has several disadvantages:

  1. No room for error. SharePoint gives site administrators only one chance to get it right when the site is created. If the site creator makes a mistake -- like failing to categorize the site or categorizing it incorrectly -- it's relatively difficult to correct. Even if it is done right the first time, it's hard to update the Site Directory to reflect changes in the organization after the fact.

  2. No security trimming. SharePoint normally shows information to users only when they pass a security test. If SharePoint determines that a user should not be able to see a particular piece of information, it trims the data from the display --- hence, security trimming. Although the Site Directory can be security-trimmed, this does not happen out of the box and requires too much care and feeding for a typically overburdened SharePoint farm administrator to manage properly.

  3. Site Directory is centrally located. Although this is a good thing in some respects, it means that it must be "opened up" to allow access to any site administrator. Many organizations consider this an unacceptable security configuration. As a result, Site Directory maintenance adds an additional burden onto the shoulders of overworked SharePoint farm administrators.

Some companies can live with those restrictions. However, many enterprises would like a site map with a little more flexibility. For example, you might not want to show a user a link to a site to which the user does not have access. Again, this type of security-trimming feature can require extra work.

You might also be in favor of a proper division of labor. That means pushing site map maintenance off the SharePoint administrator's shoulders and onto the site administrator's shoulders where it belongs.

How about easier administration? For instance, allow typical CRUD operations -- known as CReate/Update/Delete. With that flexibility, site administrators can create, update and delete their own piece of the site map.

So how can you meet your SharePoint objectives? Here is an overview of its features:

  • Content type and site columns -- Defines a site name, site group and a link to the site.

  • Custom lists -- Site administrators, not SharePoint farm administrators, create custom lists associated with that content type. They populate the list with links to their site and any subsites for which they are responsible.

  • SharePoint security -- Enable item-level security on the list. For each site in the list, configure security to allow read-only access for each user, SharePoint group and Active Directory group to which the site should be available.

  • Content Query Web Part -- Use the web part to produce the security-trimmed site map.

Now you're ready to create your own site columns and site content types. The following is a detailed walk-through on how to do it:

At the root site of the site collection, create a site column named Site Group:

  1. Go to Site Actions.
  2. Select Site Settings.
  3. Under Galleries, select Site columns.
  4. Click Create.
  5. For Column Name, enter Site Group.
  6. For "The type of information in this column is" select Single line of text.
  7. Create a new group named Secure SiteMap
  8. Leave all other values at default and click OK.

Create another Site Column named Site Map Link. For type of information, select Hyperlink or Picture. It's located near the middle of the choices. Add this to the Secure Site Map group.

Go back to Site Settings and this time select Site Content Types under Galleries and create a content type as shown in Figure 1.

creating SharePoint site map.
Figure 1: Select Site Content Types under Galleries.

Next, add the Site Group column to the site content type:

  1. Under Columns, click Add from existing site columns.
  2. Locate the Site Group column.
  3. Keep "Update all content types…" as its default value of Yes. In this case, it does not matter what you choose.
  4. Click OK.

Repeat above by adding the second column, "Site Map Link."

Now create a place to test what you've done. In a sandbox environment, create three sites under the site collection root site as shown in Figure 2.

creating SharePoint site map Figure 2: In a sandbox environment, create three sites under the site collection root site.

At each site, create a custom list using the Site Map content type described above. Here's how:

  1. Go to site settings and click Create.
  2. Under Custom Lists, select Custom List.
  3. Name the list "Site Map" and click OK.
  4. Go to the list's advanced settings and mark yes to "Allow management of content types?"
  5. Click "Add from existing site content types" and add the Secured Site Map content type to the list.
  6. Finally, remove the Item content type from the list of managed content types.

Now populate the custom list. In each site map custom list, create entries as shown in Figure 3.

creating SharePoint site map
Figure 3: In each site map custom list, create entries to populate custom list.

Remember that the Site Map Link will vary based on your environment and the actual location of your sandbox.

Now it's time to manage the Quality Control permissions. In order to demonstrate the secured part of the Site Map, we need to use SharePoint's item-level security. Via the dropdown over the Title column of the item, Quality Control, select Manage Permissions. From there, make the changes as shown in Figure 4.

creating SharePoint site map
Figure 4: Manage Quality Control permissions.

Here are steps involved:

  • Actions then go to Edit Permissions.
  • Click OK when it warns you about creating unique permissions.
  • New the go to Add users.
  • Add yourself and give yourself full control.

Remove all other user profiles with the result, as shown in Figure 5.

creating SharePoint site map
Figure 5: Final step -- Remove all other user profiles with the result.

Now you are finally ready to create the Site Map. At the site collection's root site page, add a Content Query Web Part. Note: CQWP shows up only in the web part gallery when the publishing feature is installed. Edit the page, add a web part and select the Content Query Web Part. Modify the CQWP's properties as follows:

  • List Type: Custom List
  • Show items of this content type group: Site Map
  • Show items of this content type: Secured Site Map

Under Grouping and Sorting:

  • Group items by Site Group

View the results. First, log in as a test user. Figure 6 shows what the results look like.

Run System Center Capacity Planner
Figure 6: Log in first as test user.

Next, log in as yourself. Click on the Quality Control link, and the results are shown in Figure 7.


Figure 7: Now log in as yourself.

This approach does have certain limitations. First of all, you must have Microsoft Office SharePoint Server 2007 for this particular approach because it relies on the Content Query Web Part, which is a feature that's not available in Windows SharePoint Services.

Another issue is that the CQWP does not span site collections, and this approach does not allow you to create a farm-level site map. The latter can be overcome using Search instead.

At a high level, site administrators would create site content types and custom lists to manage site map data exactly as described above. However, use a Core Search Results Web Part with a fixed keyword query instead of the CQWP to create the site map. This method would require editing XSLT.

Contrary to popular belief, enterprises can create site maps using out-of-the-box SharePoint features that require no custom coding of any kind. This approach results in a security trimmed site map, which is managed by site owners.

It's all about flexibility. Empowering site owners to manage their own part of the site map puts the responsibility where it belongs and frees up SharePoint farm administrators to manage more critical aspects of the SharePoint environment.

Paul Galvin is a Microsoft SharePoint MVP and a SharePoint solutions architect at EMC Corp. Galvin has worked in the IT industry for more than 15 years in areas such as software development, consulting and SharePoint solutions design, where he works with clients to create business solutions using the SharePoint platform. He contributes to the SharePoint community through MSDN forums and his blog at http://paulgalvin.spaces.live.com.
 

Dig Deeper on Microsoft messaging and collaboration