In this article we can explore how to create Content Type creation.
What is Content Type Hub?
We can use Content Type Hub to share the content types across multiple web applications.
For example, you created an Expense Content Type
& wanted to share with multiple web applications. Content Type Hub
is a web application which allows sharing of content types. The
centralized content type rendering reduces the effort in updating
For example, if the expense content type template is changed, then you need to update only in one place.
Step 1: Create Content Type Hub web application
Go to SharePoint Central Administration & create a new web application. Call it as Content Type Hub.
Open Central Administration > Manage web applications link
In the appearing page, choose the New button. In the appearing page, enter the details as shown below.
Click the OK button to create the web application.
Wait for a few minutes & you will be ready with the web application.
Click the Create Site Collection link to create a site collection inside our new content type web application.
After creation, navigate to the newly created content type hub web application.
Now we are ready with our content type web application & site collection.
Step 2 Configure Managed Metadata Service
In this step, we need to configure Managed Metadata Service to
use our newly created content type hub URL. This makes the subscriber
sites to use our published content types.
Open Central Administration > Manage Service applications link
In the appearing page, locate the Managed Metadata Service row & click on the Properties button from toolbar.
In the appearing page, come to the bottom & enter the content type hub URL as shown below.
Now you have set the Content Type Hub. Click the OK button to save changes.
As the next step, click on the second row in service applications & click Properties.
In the appearing page, check the option Consumes content types from the Content Type Gallary at url
Click the Ok button to save changes. Now you are ready with content type infrastructure.
Step 3 Create Template
We are planning to create an Expense Content Type along with a Template.
Create an excel file & format the cells with following fields.
Now save the file as Excel template
Step 4 Create Content Type
Now open the content type hub web application & go to site
actions > site settings > site content types > create content
Enter the name as Expense Content Type & select Document from the category.
Click the Ok button to continue. In the appearing page, choose Advanced Settings.
We are going to edit the template URL now. In the appearing page choose our Excel Template file.
Click OK to save changes.
Now from the Expense content type page choose the Manage publishing for this content type link
In the appearing page, choose the Publish option
Click the OK button to continue.
Now the content type will be pushed for publishing.
Step 5 Run Timer Jobs
The actual publishing is done through 2 timer jobs:
1. Publishing Timer Job
2. Subscriber Timer Job for each Web Application
We need to run those timer jobs.
Open Central Administration > Monitoring > Review Job Definitions > Locate the Timer Jobs > Choose Run Now option
You can verify the jobs have completed through the Running Jobs link.
If the page is clear then it means the jobs have completed. You
have successfully published the Content Types through Content Types Hub.
Step 6 Test the Content Type
Now we are ready to test the published content types. Please note that we have the following:
1. Content Type Hub web application
2. Consumer web application (default SharePoint site)
Open your default SharePoint site & go to site actions > site settings > site content types page. You should see the Expense Content Type there.
Create a new document library. Go to Library Settings > Advanced Settings > Allow Management of Content Types enable.
Come back to the Library Settings Page & Delete the existing
content type there. To delete it, click the Document content type &
choose the Delete option.
Now choose the Add from existing site content types option.
In the appearing page choose the Custom Content Types option & select the Expense Content Type & click the Add button
Click OK button to save changes.
Back in the library, choose the New button & you will be getting the new document created from Expense Content Type template as shown below.
Click Save changes & you will get the xlsx file saved in document library.
This concludes the usage of content type template.
For changing the template, you can go the content type hub, edit
expense content type, upload new template (change color) & choose
the publish procedure.
After publishing is over, you can try creating new document & the new template should reflect the changes.
In this way we can have centralized control over content type & template.
1. Under the hood Content Type Publishing is done through Managed Metadata Service.
2. It is advisable to use a separate content database for the site collection hosting content type.
3. Custom Group for content types & Inherited ones are easier to maintain & republish
In this article we have explored how to create content type hub.