in SharePoint 2010

Content Type Hub – Publishing and Subscribing to Content Types Programmatically (C# Code)

Below is a simple code snippet that you can wrap in a site scoped feature to publish and subscribe to content types from a content type hub.

As a precaution, please be careful to use this code snippet in production unless you have thoroughly tested it.

Why do we need it?

This is very useful when you are provisioning a site using a web template. This code, wrapped in a site scoped feature will push the published content types from the hub to the new site. You don’t have to wait and guess when the content types will be available in the newly provisioned site.

Read more here

Write a Comment

Comment

Time limit is exhausted. Please reload the CAPTCHA.