views:

184

answers:

2

I have a custom MOSS publishing site collection / sites which have been provisioned with the following site definition properties within ONET.XML.

<Properties xmlns="http://schemas.microsoft.com/sharepoint/"&gt;
    <Property Key="SimplePublishing" Value="false"/>
        ...
    <Property Key="VersioningOnDocuments" Value="Major"/>
</Properties>

Is it possible to access/update these properties through the API such that, for example, all newly created document libraries have major/minor versions?

I'd like to do something like this:

PublishingWeb.Properties["VersioningOnDocuments"] = VersioningSettings.MajorAndMinor;

I haven't had any luck so far determining where these properties are stored.

Thanks.

A: 

The properties that you see like <Property Key="VersioningOnDocuments" Value="Major"/> are used by the feature or Provisioning Engine at the time of creation of the Site.

The only way to change them is to edit the onet.xml and you are forbidden to do so if it is a Out of the Box Onet.xml that came along the SharePoint Installation.

To Solve your requirement you can take this way

  1. Make a copy of the Custom Site Definition and Edit the onet.xml of the new Custom Site Definition.
  2. Create a Feature Handler that will change the versioning setting and Staple the Feature to the Site Definition you are Interested in.
Kusek
Thanks Kusek. I've already created a custom site definition and provisioned the site collection. I'm looking to change this setting *after* provisioning with a feature, but cannot find how to access these properties through the API.Unfortunately, I'm not able to start with a new site collection at this time.
Brent
A: 

Hi Brent, Did you get any solution to change the provisioning for existing sites?

Naresh
Hi Naresh, no... I never did find a solution for this.
Brent