MOSS 2007 Content Types

Content Types is one of the new features of MOSS 2007, and WSS 3.0, a content type is a logical grouping for a set of informational fields that serve a common and specific purpose, you should decide which content types you need to have for your application, content types should be based on existent content types, and all parent's fields are copied to the new site content type, in other words you can consider the content type as a Class in OOP terminology, and this class is attributed by Must-Inherit, this is a good analogy that makes things easier to grasp, unsurprisingly site content types are built from site columns, so why the site content types are important and why should we start creating site content types and then bind lists or document libraries to them, rather than starting by creating lists or libraries right away by creating required columns, site content types are better to start with for the following reasons:

  • Site content types are reusable, just like OOP classes are.
  • Site content types can be associated with workflows, that are initiated either automatically upong item's creation or manually depending on the workflow type, for example if you associate the content type with "Collect Signatures" workflow, this type of workflow should be started from Microsoft Word application, there is no way to start it from web interface.
  • Site content types can be associated with Information Management Policy, whereby you can impose auditing based on specific selectable events, or you can enable item's expiration by setting a dynamic expiry date " e.g. project's start date + 2 years ", and select the appropriate action to be taken against the expired item, also if the content type is based upon Document content type, you can set document converters for the content type's instances.
  • The above reasons are not everything to justify using content types, however using site columns is so similar to content types, but in a nutshell you use site columsn whenever you want to have a global field/column that will be reusable by more than one list or document library, or basically by a site content type, always think of content type as a class, and site column as a field/property/member variable, these are the available content type's settings:

  • We'll create a site content type called "Projects" to track projects' deadlines, budgets, and resources, then we'll create a custom list that's based upon the Projects content type, to create the Projects content type:
  • Create a new site, give it any name you want, such as Project Management.
  • Select Site Actions -> Site Settings.
  • Galleries -> Site content types, you will get all the categorized site's content types as shown below:


  • Click Create.
  • Enter Name, Description, select Parent Content Type, and enter the Group under which the new content type will be added, enter the values as in this screen shot:


  • Now, you have to add the site columns that will compose the content type, click Add from new site column, add the following set of columns





  • After you're done with creating the site content type, browse to Site Actions -> Create.
  • Select Custom Lists -> Custom List.
  • Enter required data, Name : Projects, then click Create.
  • From Projects list Default view, click Settings -> List Settings.
  • Click General Settings -> Advance Settings.
  • Select Yes for Allow management for content types?, it's No by default.
  • Click OK.
  • You'll get directed to the Project List Settings, and you will find a new section added to the settings called Content Types, and the Project content type is listed with the default item content type, you can delete the default item content type, as we'll not use it for this example.
  • From the sitemap breadcrumb browse to the Projects list.
  • Click New, you will find Project listed, this is because the list is based on the Project content type and it's the default content type, after we deleted the item default content type

  • You will get to the new form, this form is built based upon the Project content type

  • Note that you can select more than one resource to be assigned to the project, and this is quite practical, remember that while adding this site column we've selected it to allow multiple values.
  • After adding this first project, you will get directed to All Items default view for the list, and it's only showing the title and attachment columns, now we'll edit this default view, by clicking All Items -> Modify this View, select Project, Project Client, Project Start Date, Project End Date, Budget, and Resource respectively, by setting the Position from Left.
  • Expand Totals group, for Budget select Sum, and for Project select Count, then click OK.

After modifying the view, you will get all the data you've entered before

  • Note the aggregate/total we've just entered while modifying the default view, under Project you will get the count, and under the budget you will get the subtotal for budgets.

One of the new features of MOSS 2007, Gantt View, that's a very common view/chart for project mangement that depicts the project's duration against time line, so we'll add a new Gantt view to get a bird's eye view about projects' durations, Click the View dropdown for the projects list and then select Create View, Click Gantt View, Provide a name "Gantt", Select Columns to be listed and provide the columns order, expand Gantt columns, and provide the Gantt specific columns, these columns are mandatory for Gantt view, for Title select Project, Start Date : Project Start Date, Due Date: Project End Date, click OK.


Select Gantt view from the views dropdown, you will get the Gantt view for the entered data, and you can edit projects' items from this view.

In this post, we've examined site content types and site columns, also we've gone through the new Gantt view.

Labels: