Let's use content types to create a list that will contain several different types of vehicles.
It makes sense to start with a base class of Vehicle which will contain columns of data that are common to all types of vehicles. These columns might include number of doors, color and transmission type (automatic or manual).
We can use the SharePoint web interface to create our base Vehicle class. Click on Site Actions->Site Settings
Under Galleries, click on"Site content types"
Click on the "Create" button and fill in the form as shown here:
We fill in the fields for the Vehicle content type as shown below:
When creating a new content type, SharePoint prompts us to select a parent content type. Since we plan on using our new content types inside of a list, we use the Item content type found in the List Content Types group.
In this example, we create a new content type group named "Vehicle Content Types" in order to organize our new content types.
Click the "OK" button to create the Vehicle content type.
Now we add columns to the Vehicle content type by clicking the "Add from new site column" link under the Columns section of the content type:
Add a single line of text column for number of tires and color and a choice column for transmission type which include a choice for Manual and Transmission. The Vehicle content type should appear as follows after adding the columns:
Now we will create a Truck content type using our newly created Vehicle content type as the parent. We will add a specific column to the Truck content type named "Bed Size" which indicates the size of the truck bed.
We first go back to site settings and create a Truck content type filling in the properties as shown below:
We select the "Vehicle Content Types" group and select "Vehicle" as our parent content type. We then add the new Truck content type to the "Vehicle Content Types" group by selecting the "Vehicle Content Types" group from the drop down list.
Click "OK"
We see the columns that were inherited from the Vehicle content type as shown below:
Now we will click on the "Add from new site column" link to add our "Bed Size" column which is specific to the Truck content type:
Next we repeat these steps and create a content type named "Car" using the "Vehicle" content type as the parent. We will add a column named "Is Hatchback" which will be specific to the "Car" content type as shown below:
Next we create a custom list named "Vehicles" and enable management of content types by clicking on "List Settings" and then clicking on "Advanced settings":
Click "OK"
Scroll down to the "Content Types" section and click on the "Add from existing site content types" to add Car and Truck content types to the list:
Click "OK"
Let's test our new content types in the list by browsing back to the list and clicking on "Items". Click on the "New Item" arrow and select "Car". You will see a form that has the properties we inherited from the "Vehicle" content type and the "Is Hatchback" column we added to the "Car" content type:
You will notice when you add a "Truck" item the "Bed Size" column will appear on the form along with the columns we inherited from the "Vehicle" parent content type.
Great stuff that we can use with only a little configuration!











