I have a site called Exhibitions that contains many many subsites each of which is an individual exhibition (with pages, images etc). I would like to attach to each of these subsites a property which indicates whether it is a past exhibition, current, or future. I know I could do this with property bags, but that is out, as the setting must be made within sharepoint (not designer) by someone nontechnical. I know I could put a list in each of the exhibition subsites that has a single status column.... and truthfully this is the way I am thinking of going. But I am also considering using social tags (applied to the default.aspxs of each exhibit), as we do not use them for anything else.

I will need to create a control that pulls out and displays (depending on what parameter it is passed) all links to the current, future, or past exhibitions as quickly as possible. I know if I use the list method the control will have to traverse all the exhibition subsites looking in the list I have created there with the status field. If I use the tag method the control will use SocialTagManager.GetUrls (I presume it can do so within a particular context, i.e. the Exhibitions parent site).

Like I said I am leaning toward the list method, but the tagging method seems like it could work well. The one disadvantage I thought it might have is in ordering. I would want to respect site ordering in the navigation settings which I can do if I traverse the subsites. I do not know in what order GetUrls will return.

One thing I don't like about either method is that is is not easy to see (within sharepoint at a glance) which site is classified as what.

3 Answers 3


I sometimes do this with a list per site, and other times with one list in the parent site (though the list can really site anywhere in the Site Collection).

In the latter case, the single list has a column called URL (or similar) that contains the relative path to the subsite. Then in the subsites, I have a DVWP which displays the item which matches the current path.

Which of the two approaches is best in each case is driven primarily by the content management goals, either centralized or decentralized.

The other benefit of the centralized list is that it can be used to easily generate the set of links to all of the subsites, excluding any which have been marked as inactive, under construction, etc.


We had a similar scenario in which we needed to store 'site metadata' for home-brewed project sites i.e. the PM, the budget, time frames etc.

We went with a list in the site template and filled out the details upon deployment. The lists could then be queried by web services elsewhere, embedded in web parts or used for conditions in workflows.

This is the only way we could find of adding metadata at the site level OOTB... So if there's any other answers I'd love to hear them.

(and then the business decided they did have the moolah for PWA after all rendering the above work obsolete - but at least it might help you with your scenario!)


Ok, My apologies for taking so long to get back to this... one thing led to another and to another and to another.... Anyway, we ended up solving this in a rather simple way. We simply created a new page layout to which we assigned the default.aspx page of each of the exhibition sites. This page layout is associated with a new content type, called ExhibitionType, which has a field whose value can be set to current, future or past. Our not-technical people can set this field via Page Settings. And in code we can access this value as follows:

using (SPWeb exhibitWeb = exhibitSite.OpenWeb())
    // convert the web to a publishing web so we can get default page
    PublishingWeb web = PublishingWeb.GetPublishingWeb(exhibitWeb);

    // get default.aspx file and convert to list item
    SPFile defaultFile = web.DefaultPage;
    if (defaultFile != null)
        SPListItem defaultItem = defaultFile.Item;

        // make sure that the default file has the ExhibitionType field (it would 
        // have to have the Exhibition Page layout)
        if (defaultItem.Fields.ContainsField("ExhibitionType"))
            string exhibitionType = defaultItem.GetFormattedValue("ExhibitionType");

I appreciate all the alternative answers that were suggested!

K. Jones

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.