// T3chNicaL.LEad

“If you don’t know where you’re going, you’re unlikely to end up there.” – Forrest Gump

Adding Content Types to a Provisioned Site July 16, 2008

Filed under: SharePoint — Lawrence Cawood @ 1:04 am
Tags: , ,

We came across this little nugget on MSDN that might be useful to some…

To add a content type to a provisioned site through the Windows SharePoint Services object model:

1. Use the AvailableContentTypes method to access the content types that are available for the site. This method returns an SPContentTypeCollection object.

2. Create a SPContentType object using the SPContentType method.

3. Use the Add method to add the SPContentType object to the site content type collection.

Source

 

Leave a Reply