Those of you that have spent some time looking at SharePoint 2010, may have noticed that the Site Directory has been largely dropped. On account of this, myself and several other writers on this blog have been working on a custom solution called ‘Site Directory for SharePoint 2010’ which is now available on CodePlex here: http://spsitedirectory2010.codeplex.com/
Update 12/05/2010: v1.4 has now been added to the Codeplex site. This includes a wide range of new features including a Site Data webpart, support for sub-sites, support for site images and more flexibility over site directory placement.
As you’ll guess from the name, this solution aims to provide a similar set of features as the old 2007 Site Directory but it goes a bit further and has several key benefits over the way Site Directory was implemented in 2007. Before we go into details about what our solution does, lets take a minute to explore why we felt a custom solution was needed.
What do you mean, the Site Directory has been dropped!?
In SharePoint 2010, it is no longer possible to create a new site based on the Site Directory site definition. However the site definition is still installed and if you are willing to hack the webtemp.xml files a bit you can create site based on the old 2007 definition but it is literally that. It does exactly what the 2007 site directory did, with a few deprecated features including the ‘create site’ button.
The purpose of the retaining the old site definition in 2010 is purely to support in-place upgrade scenarios from 2007 to 2010. No investment has been placed into the site definition capability for 2010 and the intention is that you build your own solutions.
Additionally, I know many customers found the 2007 site directory somewhat lacking in functionality, common complaints included:
- The disconnection between the site and the site list item. Especially regarding site that were create outside of the site directory
- Awkward user interfaces
- Limited scope to the local web application
- The broken links scan job did not fully remove stale listings
So what does Site Directory for SharePoint 2010 do?
The solution we have built takes the principles of the old 2007 site directory and extends them for SharePoint 2010. There are three main components
- Site Listings List: A basic SharePoint list which stores an entry for each site that is picked up by the Scan Job. This list includes a large range of default metadata, which is entirely taken from the site itself (no manual intervention). The default fields are:
- Owners (3 configurable methods of classifying owners)
- Create Date
- ID (Guid)
- Site missing Count (used by the delete job to keep a tab on how many times the site has been missing when scanned)
- Template (support all site definitions and templates, including custom ones)
- Sub webs
- Author (the user who created the site)
- Secondary Contact
- Storage used (in Mb)
- Site Quota Used (as a %)
The idea is that this list can be used as-is or administrators can add additional fields which map to their business. These could even use the new Managed Metadata Service.
The Site Listing itself is driven via a Content Type.
- Update 12/05/2010: Site Data Webpart: A webpart which can be placed on each site to show that site's listing data from the site directory.
- Scan Job: A timer job which scans Web Applications for sites and updates or adds to the Site Listings list. Supports exclusions, three different ways of identifying Site Owners and can be configured for multiple Web Applications, each with their own schedule.
- Delete Broken Listings Job: A timer job which checks each Site Listing to see if it exists. If it does not then it keeps a count of how many times it was missing and then removes the listing once a configurable number of missed scans is reached.
In addition to the three main functionality components, there is a set of comprehensive administration pages which allow administrator to fine tune the solution.
How was it written?
The solution was written entirely using Visual Studio 2010 against SharePoint 2010 release candidate. So if you are yet to play with Visual Studio 2010 for SharePoint development, this solution is a great starting point as it touches on many different aspect of a SharePoint solution.
Naturally, the solution uses features as much as possible and is packaged into a single WSP file.,
How do I get it?
The solution and source code is available now on CodePlex on this URL: http://spsitedirectory2010.codeplex.com/
This is just v1.0 of the solution. We have many ideas of things we could do to improve it so if you have a great idea or request please either comment on this blog article or use the discussions feature on the CodePlex site to add your comments.
This article was published by
Please feel free to contact me directly via email or via the blog comments if you have something to say about this article.