One of the feature which SharePoint supports is an Object oriented concept. Content Type is the key for the SharePoint to arrange the content within the content management system. Content Type supports an inheritance concept. Content can be queried and arranged easily within SharePoint if Content type is defined wisely. Content Query Webpart can filter the content based on the Content Type. Without writing single code the content can be queried within Site Collection using a Content Type. The content type ID supports inheritance. The following link shows how to use the Content Type ID based on inheritance using ID http://msdn.microsoft.com/en-us/library/aa543822.aspx.
There are two ways of achieving the content type inheritance,
1. First strep is directly in the SharePoint site. (part 1)
2. By using the WSP as a feature using the VS 2008. (part 2)
Content Type Directly on MOSS Site or Site Collection
Before proceeding to create a Content Type, please read the following link about content type http://msdn.microsoft.com/en-us/library/ms472236.aspx. Once you have a better understanding about the content type you are now ready to go. Content Type can be created by site level or to a list. Site Content Type can be inherited to all its sub sites. A content type added to the list is specific to that list. The content type is copied to that list.
Ok lets create a content type… Below diagram shows the sample inheritance.
Fist step need to know where all site content types are located. You can find all using Site Actions->Site Settings, under galleries section, Site Content Types.
Creating Content Type
Use the Site Content Type library to create a content type. Click on the create button to create a Content Type. We would create a Base Content Type and inherit the content type accordingly. In the sample below we will create 9 content types to enter a animal to the Taxonomy.
Base Content Type
First the base content type will inherit from List Content Type and parent content type to be item. Once the content type is created we need to create a site column for the type.
Using the site column i have created two Site column called “Taxon Name and Taxon Description”. These column will be added to the Site Content Type.
Add the Name and the Description column created from the above steps to the content type. Make sure you have selected Yes in the option which will update all the content type inherited. Also please hide the Title column if not needed. We should not delete the title column. Now the Base Content Type is ready. Then now lets create a inherited content type from this Base Taxonomy.
Create a content type inherited from the Base Type. In the Select Parent type from, select the My Content Type and in the Parent Content Type select the Base Taxonomy.
Once the content type is finished. The base content type will be the Base Taxonomy, the base content type is shown as below.
Now can add a new column for the Inherited Content Type “Animal Domain”. To do just click Add from New Site column option.
When you see the above content type the Name and Desc is from Base Taxonomy and the Domain ID is specific to the Animal Domain Content Type.
So once all the content type is finished the content type structure will look like the above screen.If noticed, the name and desc inherited from Base Taxonomy , Domain ID from Domain Content type, Kingdom ID from kingdom, Phylum ID from phylum. So finally when species content type is created all the hierarchy is maintained automatically. So now if i add the final Animal content type inherited from species the full structure will be ready !!!
This is the final Animals Content type inherited from species
Now when the Animal Content type is added to list the entire structure can be created. For sample the animal
End of Part – 1 creating content type inheritance directly in SharePoint