Some folk usually say that Web parts are the building block for SharePoint... I would have to say Content Types are pretty high up on the list too and when you combine best of both you can get a simple and neat solution.

By focusing on your content types, your design can often be more elegant and simpler. Content Types are diverse and can be used across many facets. Some can include standardising your document formats/templates, types, policies and workflows that could apply to a type of document.

So here’s my problem statement:

The need to display a link of all policy documents across all sub sites in a site collection that are found in the Policy Library of that site; but only if it is marked as visible to all on the Corporate Portal. After a year a policy needs to archive all these policy documents across all sites.

Before I continue, if you’re new to content types or are unsure of the terminology or what they do, take a look at:

http://msdn.microsoft.com/en-us/library/aa543822.aspx

http://msdn.microsoft.com/en-us/library/ms452896.aspx

So essentially, by defining a Content Type, you’re able to couple all similar types of content within your site in a similar or unique way and reuse them. Apply document templates, list templates, enforce a policy, apply a specific workflow and define columns for this particular content. Powerful if you have inheritance in your ECM design and need a central source of content. Imagine updating your workflow on your content type and it updates all instances across multiple sub sites. Neat!

The question always pops up is how I could get a cumulative list or view of content in these large number of sub sites (in my case department sites) in a central view without duplicating the source document.

All the above revolve around the content type.

It’s very simple; use the content query web part along with your content type. With logical grouping of content types i.e. Policy Type and a column called Display with a selection of Yes/No it was easy. Policies will be found perhaps on many sub sites in various libraries scattered across these sites.

I’m not a firm believer in duplication of content in SharePoint for the simple reason that if you have a source legal document copied across multiple sites it becomes more difficult to manage. Even by using some of the built in functionality.

Here’s an option:

Remember that the site you wish to have your Content Query Web Part (CQWP) must have the publishing feature enabled. So yup, this is a MOSS Standard or Enterprise feature – no WSS.

After adding my CQWP on my page, I apply some basic settings to it:

 

Notice that I will have all these content type documents stored in a Document Library hence my List Type. The Content Type is found under the MarcL Content Types Group and specifically the Policy Document type. You can apply many other settings like Item Filters on the metadata and Audience settings. I’ve selected that my Display on Root column also needs to be set to Yes before displaying my result on my query.

The results are:

 

The cherry on top is then having a specific audience for various types J

Its that simple to collate and query your content types.

There is an Enhanced Content Query Web part available for download from Codeplex: http://ecqwp.codeplex.com/

It gives you the ability to have a Context menu.

So you can directly View, Edit Properties, Download a local copy or set an Alert! Cool!

Happy SharePoint

 MarcL