Tuesday, January 19, 2010

Content Type Publishing in SharePoint Server 2010

This particular post has to do with the improvements in the concept of Content Types in SharePoint Server 2010.

So before going into the improvements of content types, lets first discuss what are content types and the limitations of it in MOSS 2007. Content Types are used when you would like a document library to give you the option to create an excel sheet, a word document , a powerpoint presentation etc when you click on the new option. Content types enable you to store multiple different types of content in the same document library or list. For example : You have created a single document library for your sales and marketing team .The sales team have their own word template and the marketing team have their own word document but you want them to use the same document library and both the team should get the option of creating their own document depending on the template suitable for their needs. For more information on content types, please refer the following two links:
(In this post I will not discuss how do you create the content types and explain the scenario's with regards to MOSS 2007)

Now lets talk about the limitation. In MOSS 2007 the content types were limited to the site collection level. That means, if we create the content type and would like to use it in another site collection it was not possible out of the box. We would have to do extensive customization to achieve it. But in SharePoint Server 2010 there limitation has been addressed and now we can publish the content types in one site collection and use them in another site collection. So now lets directly go ahead and see how we can do the publishing of the content types:
  • Create a site collection. For example I created a site collection called http://roshan-pc which is running on port 80.
  • Next we need to enable one of the site collection feature called the "Content Type Syndication Hub".
  • Once enabled you need to go to the CA (Central Administration ) site and click on manage service application which is under the Application Management section.
  • In SharePoint Server 2010, the content types are part of the Managed Metadata Service.Hence click on the managed metadata service in the service application page. Remember not to click on the name "Managed Metadata Service " as its a hyper link and it will take you to the Term Store Management page. Just click beside the name and then click on the properties tab present in the same page ( in the ribbon).
  • Once you clicked, you would get the pop up box.Scroll down to the end and there would be asked for the site collection URL which would be the content type hub. I typed http://roshan-pc and also it is recommended that you choose the option that tells "Report syndication import errors from Site Collections using this service application."
  • Then you will be directed back to the Service application page and now you need to select the Managed Metadata Service Proxy/Connection which is just the metadata service. Again do not click on the name. Click on the proxy and click on properties (available in the same page in the ribbon).
  • You would be given a pop-up box where you need to check mark the third option which tells "Consumes content types from the Content Type Gallery at http://roshan-pc " (in my scenario).
  • Then the publishing of the content type has to be done by going back to the site collection http://roshan-pc and there create a content type. I created a new content type called PRODUCT with the site columns as Product Name and Product ID.
  • Once done with you get to see an option in the same content type page called " Manage publishing for this content type" (Under settings the last option)


  • Click on that and you would be prompted to publish the content type. Click OK.
  • Next create another site collection which can consume the published content type (In my case I created a site collection called http://roshan-pc:81/ 
  • Next need to start two timerjobs which are responsible for the publishing of the content types for which you need to go to the CA site and click on Monitoring.
  • There you will find a link for Review Job defination.Click it.
  • Now you need to start two timerjobs. First one called "Content Tyep Hub", just click on this timerjob and Click Run Now.
  • Next you need to choose the second timer job called " Content Type Subscriber". Notice that if you have created two web application that you will two timerjob of the same type. Choose the one where you would be consuming the published content type. That is http://roshan-pc:81
  • Now go to http://roshan-pc:81/ and then to the site content type you will find the content type present there that was published fron the site collection http://roshan-pc/
One very important point to remember here is that if you use two different which are in two different web application then those two web application should be associated with the same Managed Metadata Service.

More on content types in the same post very soon.....

No comments:

Post a Comment