SharePoint Custom Content & Structure Report

I came across some really cool functionality in SharePoint 2007 today…. 

One of my clients has a deep hierarchy of sites and pages maintained in SharePoint – this hierarchy drives content management for their web site.  Most of the publishing pages on their site have an embedded boolean field, called “Appear on Home Page” as part of the page content type, which controls whether elements of the data contained in the page are featured on the site home page. 

My client wanted a roll-up view across the whole site of all pages where the “Appear on Home Page” field was set to “yes” so they could administer home page articles in one location rather than searching across the hierarchy manually.

Those of you familiar with WCM in SharePoint 2007 may know about the various “Content and Structure Reports,” available via either “Site Actions” menu or within the “Content and Structure” view under the view menu.  These reports traverse the site hierarchy looking for pages meeting certain criteria and display the matching pages as a list.  Users can then view/edit/delete these pages, like they would any other collection of pages contained within document libraries. 

How neat it’d be to create custom reports similar to those shipped with MOSS.

 

Turns out that adding your own “Content & Structure Report” into SharePoint is trivially easy:

  1. Access the “Content and Structure Reports” list at /Reports%20List/AllItems.aspx
  2. Add a new list item and set the CAML query field to the expression required, in my case:

    <Where><Eq><FieldRef Name=”Appear_x0020_on_x0020_Home_x0020_Page”></FieldRef><Value Type=”Integer”>1</Value></Eq></Where>

  3. Presto, the new report is available.

2 thoughts on “SharePoint Custom Content & Structure Report

  1. http://

    This may be trivial if you know the CAML syntax, but for those of us who don’t know CAML, how do we create the query?

Comments are closed.