Content Type Hub – A wonderful concept which Microsoft introduced on the era of SharePoint 2010 itself. Let us see what it is, why we require that, and how to use that on this article.
What it is?
A Centralized site collection on which we will create all our site columns and Content Types and through the Managed Metadata Service Application, these Content Types can be used across our SPFarm. i.e., other site collections can use these content types.
Why we require this?
When we are dealing with more than one Site Collections, i.e., Preview, staging and actual site collections, we may require to create same content type on all of the a above mentioned site collections. To avoid that, we can create the content type on the Content Type Hub Site collection and we can use those content types across our required site collections.
How to use that?
Let us see, how to use the content type hub in sharepoint 2013.
Let us see that with step by step procedures.
1. Let us create our SiteCollection for the Content Type Hub.
I have chosen the Product Catalog Template.
2. The site will look like below.
3. Go to Site Collection Feature.
4. Now the site collection can be used as a Content Type Hub.
5. Let us create some Site Columns and Content Types on this Site Collection.
6. The Site Columns created are as follows.
7. Now, Create the Content Type using these Site Columns.
8. Then Execute the following scripts.
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
$mms = Get-SPServiceApplication -Name "Managed Metadata Service"
Set-SPMetadataServiceApplication -Identity $mms -HubUri "http://sathishserver:3000/sites/SathishContentTypeHubSite/"
Write-Host "Done" -ForegroundColor Green
$mmsp = Get-SPServiceApplicationProxy | ? {$_.DisplayName -eq "Managed Metadata Service"}
Set-SPMetadataServiceApplicationProxy -Identity $mmsp -ContentTypeSyndicationEnabled -ContentTypePushdownEnabled -Confirm:$false
Write-Host "Done" -ForegroundColor Green
9. Now coming back to the Content Type Hub Site Collection and Go to the Content Type which we just created.
10. Select the “Manage Publishing For this Content Type”
11. Publish the Content Type.
12. Now, the Content Type has been published.
13. To Confirm that, if we again go to the same page, the Last Successful published date can be seen.
14. Now, come to the Site Collection on which we require these site columns.
15. I am using my publishing site collection.
16. Go to Site Settings and Select the “Content Type Publishing”
17. You can see the published content types here.
18. If you are not able to see that immediately, there is a timer job which needs to run. This timer is configured as Hourly basis by default. We can execute this time manually also. The timer is “Content Type Subscriber”.
19. Now, when we are going to the Content Types of the Publishing Site, we will be able to see our Content Type, which has been created on the ContentTypeHub Site Collection.
Note:
There are no way, we can set the HubRUI of the ManagedMetada Service through the UI. Even for updating also, we need to follow the powershell only.
Happy Coding.
Sathish Nadarajan.
Leave a comment