Content Type Hub Creation in SharePoint

Content Type Hub Creation

In this article we can explore how to create Content Type creation.

What is Content Type Hub?

We can use a Content Type Hub to share the content types across multiple web applications.

For example, you created an Expense Content Type and wanted to share with multiple web applications. Content Type Hub is a web application that allows sharing of content types. The centralized content type rendering reduces the effort in updating changes.

For example, if the expense content type template is changed, then you need to update it in only one place.

Content Type Hub

Step 1: Create Content Type Hub web application

Go to SharePoint Central Administration and create a new web application. Call it as Content Type Hub.

Open Central Administration then the select "Manage web applications" link.

Create Content Type Hub

In the page that appears, choose the "New" button. In the page that appears, enter the details as shown below.

Create new Application

Click the "OK" button to create the web application.

Wait for a few minutes and you will be ready with the web application.

Application Created

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.

http://hp:1000 

 navigate to content type hub web application

Now we are ready with our content type web application and site collection.

Step 2: Configure Managed Metadata Service

In this step, we need to configure the 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 then select the "Manage Service applications" link.

Configure Managed Metadata Service

In the page that appears, locate the Managed Metadata Service row and click on the Properties button from the toolbar.

Toolbar

In the page that appears, go to the bottom and enter the content type hub URL as shown below.

content type hub URL

Now you have set the Content Type Hub. Click the "OK" button to save the changes.

As the next step, click on the second row in service applications and click "Properties".

service applications

In the page that appears, check the option "Consumes content types" from the Content Type Gallary at the URL.

 Content Type Gallary

Click the "Ok" button to save the changes. Now you are ready with the content type infrastructure.

Step 3: Create Template

We are planning to create an Expense Content Type along with a Template.

Create an Excel file and format the cells with the following fields.

Create Template

Now save the file as an Excel template.

Excel template

Step 4: Create Content Type

Now open the content type hub web application and go to "Site actions" > "Site settings" > "Site content types" > "Create content type".

Enter the name as "Expense Content Type" and select "Document" from the category.

Document category
Click the "Ok" button to continue. In the page that appears, choose "Advanced Settings".

Advanced Settings
We will edit the template URL now. In the page that appears choose our Excel Template file.

Excel Template file
Click "OK" to save the changes.

Now from the Expense content type page choose the "Manage publishing for this content type" link.

content type link

In the page that appears, choose the "Publish" option.

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.

Run Timer

Run Time option

Open Central Administration then select "Monitoring" > "Review Job Definitions" > "Locate the Timer Jobs" then choose the "Run Now" option.

You can verify that the jobs have completed by using the "Running Jobs" link.

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 and go to "Site actions" > "Site settings" > "Site content types" page. You should see the Expense Content Type there.

Expense Content Type

Create a new document library. Go to "Library Settings" > "Advanced Settings" then enable "Allow Management of Content Types".

Content Types enable

Return to the Library Settings Page and delete the existing content type there. To delete it, click the "Document" content type and choose "Delete".

Delete the existing content type

Now choose the "Add from existing site content types" option.

Add from existing site content types
In the page that appears choose the "Custom Content Types" option and select the "Expense Content Type" and click the "Add" button.

Custom Content Types

Click the "OK" button to save changes.

Back in the library, choose the New button and you will be getting the new document created from the Expense Content Type template as shown below.

Expense Content Type template

Click "Save changes" and you will get the xlsx file saved in the 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 the new template (change color) and choose the publish procedure.

After publishing is over, you can try creating a new document and the new template should reflect the changes.

publishing

In this way we can have centralized control over content type and template.

Note

  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 and Inherited ones are easier to maintain and republish

References

http://bit.ly/19EPjYI

Summary

In this article we have explored how to create a content type hub.