Content types are extensions to custom types. Content types bring in central control and consistency on custom data type. For instance in the previous example we had added custom type as ‘Department’ now someone can add the custom field as ‘Dept’. In other words this can bring in inconsistency and we will not be able to query and filter data in a consistence manner. So in other words we can define a content type and then apply this content type across documents. In other words we can really drive organization level policies using content types.
To create a content type click on site action – site settings – from galleries section click site content types and you will be shown a list of existing content types.
To create a new content type click create hyperlink from the same screen which is showing list of content types.
You will thrown up a screen where you need to specify the name of your content type the parent content type and group for the same.
Once the content type is created you can add new columns using the link ‘Add from new site column’. Our custom type inherited from document content types so it had two properties i.e. name and title. We had also added ‘DepartMentName’ as the custom column in the content type.
You can add new columns using the ‘Add from new site column’. We had added the ‘departmentname’ custom field for the current instance. Below figure shows different options and data type for custom columns which are added.
Ok, now it’s time to apply this content type to our document. Click on the settings menu and then click on ‘Document library settings’.
You will be popped up with the details of the content type. Click on ‘Add from existing site content types’ and select the custom content type we have just created i.e. ‘MyContentTypeForDocuments’.
You can now select the content type for your document library.
You can see how our custom content type is seen when we try to upload the new document.
If you edit the properties you can see the ‘departmentname’ custom column in your content type.