MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Setting a property for a site in a site collection

  Date: Oct 13    Category: MOSS    Views: 988

I need to find a way to make a site active or inactive so that I can display
them as such in a webpart that I am writing. I guess the idea is like having a
list item that is set to active or inactive, but I want to set it at the site
level and not use a list. Is it possible to add a field to each site that is
created that would do something like this? I think it must be possible as sites
are just like lists.

The first run was creating a feature that would only have the purpose of being
active or deactivated, then for each site that the feature is active on add it
to my list of active sites in the webpart, otherwise add it to the list of
inactive sites. This works but it seems more like a hack then anything else, and
the users don't' like having to manage the features of each site just to set the
site to inactive.

Anyone have a better idea then a feature?



2 Answers Found

Answer #1    Answered On: Oct 13    

Yes, you can use property bags. you can have Property Bags at various levels
Web, Site, Web App and Farm.

The only disadvantage is that they can only be accessed programmatically, there
is no out of the box interface for them.

Answer #2    Answered On: Oct 13    

You can add a value to the SPWeb object's property bag. Take a look at the
following CodePlex project.


Didn't find what you were looking for? Find more on Setting a property for a site in a site collection Or get search suggestion and latest updates.