Content type in SharePoint 2016 tutorial

content type in SharePoint online

Content Types :

A content type is an entity that uses site columns to define a schema of fields for an item in a list or a document in a document library. The content types are defined outside the scope of any list or document library. A content type defines a field collection that is reusable across multiple lists or multiple document libraries. You can update a content type to make the changes available in all list and libraries.

You can also read:

Working with Content Type Hub in SharePoint 2013

A content type represents a group of informational items in your organization that share common properties. Properties may be like name, description, a grouping category etc.

SharePoint supports storing multiple content types in one document library. But only one content type can be applied to a particular item in a document library or list.

Each content type has a distinctive set of properties and metadata that describe the content. This can include fields that are associated with the content type that can be displayed as columns in the list or document library. It can also include a specific document template used when creating instances of the content type.

You can access the content type from the URL directly http://mypc/sites/MySP2016SiteCollection/_layouts/15/start.aspx#/_layouts/15/mngctype.aspx
Or we can access it from the Site Settings page -> then click on Site content types which is under Web Designer Galleries.

Here you can see all the site content types like below:

content type in SharePoint 2016
content type in SharePoint 2016

Also, you can see how we can retrieve all content types using PowerShell in SharePoint 2013.

You can also filter based on the content type group. Like you can filter list content types like below:

content type in SharePoint online
content type in SharePoint online

When you add a content type to the content types gallery of a specific site, that content type is available for use within the current site, as well as in all the child sites in the site hierarchy below it. When you add a content type to the content types gallery of a top-level site, it is available for use throughout the entire site collection.

SharePoint automatically adds a standard set of content types to the content types gallery of every top-level site.

Also, you can read:

How to publish InfoPath forms as a content type in SharePoint 2013?

Few shown are:

ID Name Parent
0x01 Item System
0x0101 Document Item
0x0102 Event Item
0x0104 Announcement Item
0x0105 Link Item
0x0106 Contact Item
0x0108 Task Item
0x0120 Folder Item
0x010101 Form Document
0x010102 Picture Document
0x010105 Master Page Document
0x010108 Wiki Page Document
0x010109 Basic Page Document
0x012002 Discussion Folder
0x012004 Summary Task Folder

Steps to Create a Content-Type:

Every content type that you can create or use inherits from another content type. SharePoint provides a special hidden content type named System, which exists at the very top of the inheritance hierarchy above Item. But as a developer we never interact directly with System content type, so Item content type considered as parent content type of other content types in SharePoint.

Each content type has a string-based ID that begins with the ID of its parent content type. Let us say u create a content type based in Item content type then the content type ID will begins with 0x01. The Document content type, which inherits from Item, has an ID of 0x0101. Content types that inherit from Document have IDs that begin with 0x0101 such as Form which has an ID of 0x010101.

When you will create a new content type, the content type id will be in below format.
Base Content Type ID +00+a new GUID.
Like a new content type which inherits from parent will be like below: 0x010100F51AEB6BBC8EA2469E1617071D9FF658

Step:

To create a content type follow the below steps:
Open SharePoint 2016 Site using the browser. Then click on the gear icon and then click on Site Settings. In the Site Settings page click on “Site content types” link which is under “Web Designer Galleries”. This will open the Site Content Types pages. There click on the Create button as shown in the fig below:

content type in SharePoint online
content type in SharePoint online

Then give a name and description for the content type. Then choose a parent content type. Here we have chosen List Content Type and then choose Parent Content Type as Item.

Then select a group for the content type. Either you can create a new group or you can add to an existing group as shown in the fig below:

content type in SharePoint online
content type in SharePoint online

Your site content type will be created successfully and will look like below:

This is the content type settings page. You can add existing site columns or you can create new columns also.

content type in SharePoint 2016
content type in SharePoint 2016

Click on Add from site column to create a new site column for our content type.

Here I have added a site column of type choice which has below 3 values:
SharePoint Development
SharePoint Administration
SharePoint End User

Then we can add one of the existing site columns. Then click on

Then select Mobile Number column from the Available Column and click on OK as shown in the fig below:

content type in SharePoint 2016
content type in SharePoint 2016

The content type will now have three columns
– Title
– Training Type (Site Column)
– Mobile Number (Site Column)

content type in SharePoint 2016
content type in SharePoint 2016

Since we have made the content type we can add it to our list.

Open the SharePoint 2016 list in the browser. Then from LIST tab click List Settings. Then in the list settings page click on Advanced Settings which is under General Settings.

Then in the Content Types select Yes for “Allow management of content types?” and then click on OK.

content type in SharePoint online
content type in SharePoint online

Then go back to the List Settings page, then go to the Content Types section, click on Add from existing site content types.

Then in the Add Content Types page, from the content types group, select Custom Content Types from the drop-down. And then select the InPerson Training Enquiry and click on OK.

content type in SharePoint online
content type in SharePoint online

The content type added successfully.

Now open your list and go to ITEMS tab and then click on New Item, you can see the new content type as shown in the fig below:

content type in SharePoint online
content type in SharePoint online

If you will open the InPerson Training Enquiry you will see the columns which we have added to the content type like below:

content type in SharePoint online
content type in SharePoint online

Hope this will be helpful.


You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →