Monday, 21 June 2010

Grouping documents through folder content types

With the advent of document sets in SharePoint 2010 and the ability to provide grouping between sets of documents, I thought it would be nice to see how we can mimic similar behaviour in SharePoint 2007/ WSS 3.0.
A nice way to group documents is to create a new folder content type by extending the OOTB one.
To start with you will need to create site columns which you want to use to classify your folders. You can do this via the GUI interface, or release these in a feature as part of a WSP package. For the purpose of this example I have created an 'IsClient' site column which is a multi-choice field with 3 options.
You can then go to create a new site content type via Site Settings -> Site content types. On this screen, ensure you select the parent 'Folder Content types' and select the 'Folder' option as the parent:
After creating the content type, you must specify which site columns you wish to use with the content type:
In this case, you can see the IsClient site column I created earlier. After we have created our site content type and allocated the relevant site columns to this folder, we need to add this new folder content type to a document library. First you need to make sure you can manage the content types for the document library by going to the 'Advance Settings' page of the document library and setting the 'Allow management of content types?' to YES.
You can now add the 'Client Folder' content type to the document library by clicking on 'Add from existing site content types' and selecting your folder content type:
After you have done this you will be able to see the folder option on the toolbar for the document library:
Now you will be able to classify this new folder using the metadata you have specified in its columns:
This feature is extremely useful if you want to quickly group documents based on specific meta data. You can also use this new folder for filtering document library views based on the folder metadata. I have since integrated this into SharePoint search to allow for us to search for specific folder types.

No comments:

Post a Comment