In this article we will be seeing how to publish content type in SharePoint 2010.
SharePoint 2010 introduces a new concept called Content Type Hubs. It's a way to make content types available centrally and be reusable in the Farm. This is a huge improvement from SharePoint 2007 both in terms of management of content types and overall flexibility that comes with it. In SharePoint 2007 there is no way to manage Content type centrally. SharePoint 2010 has provided out of the box support for sharing Content Types across farm level. First we need to create a content type in a site collection and we have to publish that. We will be seeing how to do that in this article.
How to publish Content Type:
First select a site collection as a place to host your content types. You will define your content types to share across, in this site collection. You can create a new site collection or use an existing one. Once you have a site collection in your hand, create a content type and for this discussion let's name it CentralizedCT. Given below are the following steps to be followed to create a new content type that has to be published. Steps Involved:
I. Go to the site collection where you want to host your content Type.
ii. Go to Site Actions -> Site Settings -> Galleries ->Site Content Types.
iii. In the top right you can see Create, click Create.
iv. Enter the name of the content type as CentralizedCT as shown in the below figure.
v. Click OK to create a new content type named CentralizedCT.
vi. Go to Site Content Type Information and click Add from New Site Column.
vii. Enter the name for the column as Employee ID as shown in the below figure.
viii. A new field has been added to the content type.
Activate feature to enable content publishing in site collection:
The site collection, which will host content types for publishing, is known as content type hub. To enable your site collection to be a content type hub you need to activate a feature known as "Content Type Syndication Hub".
i. Go to Site Actions -> Site Settings -> Site Collection Administration -> Site Collection Features.
ii. Activate the feature Content Type Syndication Hub.
iii. Once you have activated this feature, you will find an option "Manage Publishing for this content type" in your content type setting page as shown below:
Bind the content type hub with a metadata service:
i. Go to the Central Administration->Application Management->Manage Service Applications.
ii. In the Ribbon click on New to create a new Metadata Service.
iii. Enter the Name, Database Name, Database Server Name and there's an option for Content Type Hub and here put the url of your site collection you have selected/created (for example, http://demo2010a:5000/). Now your metadata service is ready.
iv. Configure Metadata Connection: To configure metadata connection, go to metadata service connection properties and ensure that the connection consumes the content type hub as shown below.
Publishing the Content Type:
Now you go back to the site collection (which is used as content type hub) and go to content type settings page. Here in this page you will get the option "Manage publishing for this content type" option. Now click on the link "Manage Publishing for this content type" and ensure the 'publish' option is selected and then click OK as shown below.
To use published content type from a different web application or site collection, you need to associate the metadata connection with the web application.
Thus we have successfully published the content type which can be used by other web applications or even other farms.