Content Types

Content types are reusable settings that can be used across a site collection in lists or libraries. Every item or document in SharePoint is a content type. Whether an announcement, a contact, a task item, a document, or a form, they all have metadata or columns that are particular to their type of content and can be used across the site collection. The content types are stored in a Site Content Type Gallery shown in Figure 3.15. Because they are content types, they can also include workflows or information management policy settings. A document content type can contain a template for the user. When the user clicks New in a document library, instead of a blank document opening, the template appears allowing the user to fill in the blanks and save it. This also allows you to ensure the most up-to-date templates are always being used. Content types are a way to make administrating content easier. You could have 10 lists using the announcement content type. If you want to know the division for the announcement, instead of having to change the content in 10 separate lists individually, you simply edit the announcement content type, add the column, and all of the lists inherit the change.

Figure 3.15. Site Content Type Gallery.


To think of content types in your organization, you might picture a sales contract. A sales contract requires information like name, address, sale amount, and legal information. When creating new sales contracts, it is helpful to start with a template in Word that already includes the default text and has fields to enter any relevant information. When the contract is saved, the user can be prompted for metadata such as sales date and sales amount. You can store this contract in a library that might also hold the sale invoice for the customer or any communication. You can sort, filter, or search the columns of information like any other column.

Two content types to make note of are the Link to Documents content type and the Folder content type. The Link to Document content type allows you to create a link to a document being stored in another library rather than storing a second copy in the document library. This allows you to keep only one version of the document but have it referenced in either place. As mentioned earlier, the Folder content type allows you to include metadata on a folder and take advantage of both folders and tagging. Tagging is the ability to categorize a particular piece of content.

Exercise: Creating a New Content Type

1.
Navigate to the site where you want to create the content type. In most cases, this is the top-level site. This is because of the inheritance of both site columns and content types. If you scope a content type too far down in the site hierarchy, it may become an issue later when the site is moved or the content type is needed in other locations.

2.
Click Site Actions > Site Settings.

3.
Under the header Galleries, select Site Content Types.

4.
Click Create.

5.
Fill in the Name and Description.

6.
Select the group of the parent content type and then select the parent content type. Remember that due to inheritance, it’s important to select the appropriate parent content type. Inheritance will be discussed in more detail later in the chapter, in the section “Content Type Inheritance.”

7.
Select a group to put the content type in. The grouping is for organizational purposes and makes it easier for your users to find the content type when they are attempting to add it to the list or using the Content Query Web Part. It is best to make the name relevant as well as include a naming convention to clearly establish newly created content types from the default content types.

8.
Click OK. You will now be on the page where you can customize the content type with the appropriate settings. The page will look similar to the one in Figure 3.16, which is a sample contract content type inheriting from the document content type.

Figure 3.16. Sample contract content type.


The Content Query Web Part is used for rolling up and aggregating content from across a site collection. You set this Web Part up to index through the site collection and display all of the content of a certain content type. You can even filter the content based on a column on the content type. Because it’s only using content types, only site columns are available for use in the filter. The Content Query Web Part is discussed in further detail in Chapter 5, “Web Content Management Using Publishing Portals.”

Content Tyepe Definition

You have learned a bit about the business case for content types, but what really defines them? A content type is a collection of settings on a particular piece of content. These settings are similar to the settings that can be made on a document library: columns, workflow, and information management policy settings. Additional settings can be made depending on the type of content: document information panel and document conversion. Custom forms can also be created for the item but must be custom developed.

Columns

Columns can be added to the item to force metadata for a particular type of content rather than a particular metadata. Unlike lists or libraries, all of the columns added to a content type must be site columns. These columns are available for a content type in addition to whatever columns the list or library requires.

Workflow

Content types can include workflow in the definition. The workflow can either be an out-of-the-box workflow template included with MOSS or a custom workflow designed using Visual Studio. You can’t use SharePoint Designer to create a custom workflow and attach it to a content type. Adding a content type to a workflow allows different content types in the same document library to be routed in a different manner in the example of an approval workflow. Workflow is discussed in further detail in Chapter 10, “Workflow and Process Management.”

Custom Forms for New, Edit, and Display

The New, Edit, and Display forms are the screens a user sees when creating a new item or viewing or editing an existing item. These forms can be customized and attached to a content type through custom development but not through the browser or SharePoint Designer. With SharePoint Designer, we can only attach the new, edit, and display forms to a list.

Information Management Policy

An information management policy is a group of regulations for a particular piece of content, which can be set at the list level or the content type level. There are site collection information management policies that are set at the site collection level and then applied to the relevant content. The site collection administrator manages these policies rather than the owner of the content whether it is a list or content type. Whether the information policy is being set up at the site collection, content type, or list level, the available configurations are

  • Policy Statement. This statement informs the user what the policy is or any special instructions for how the document or item should be handled. An example policy statement might be, “This document will be deleted after 7 years.”

  • Labels. A label is included when the document is printed. Labels include either text or metadata from the list. For example, this is how to make sure the author and location are always printed on the document.

  • Auditing. Auditing allows for a log of the events to be kept. The auditing can include when the document was opened or viewed, editing, checking out or in of items, moving or copying, and deleting or restoring. For example, you can use auditing to know anytime a particular type of content is edited.

  • Expiration. This allows you to schedule the expiration of a piece of content using a date or time column that is associated with the content. The action that takes place upon expiration can be to delete the item or start a workflow. For example, you may want to delete any contracts seven years after their created date.

  • Barcodes. This allows a barcode to be tied to the item that would allow for the tracking of the physical item associated with the content. Despite our efforts to move away from the paper world, we still need to print certain things. Using the barcodes you will now associate the physical printed item in file storage with an item on SharePoint.

Document Information Panel

As shown in Figure 3.17, the document information panel allows your users to view and edit the metadata properties of a document. For example, if you want to only show certain properties or add some branding, you need to create a custom document information panel template. A custom document information panel may be created with InfoPath 2007 and associated with a content type. This option is only available with content types inheriting from the Document content type. In addition, the document information panel is a feature of Office 2007 and is displayed in Word, Excel, and PowerPoint documents.

Figure 3.17. Document information panel.


Document Conversion

This is the process of automatically taking content of one file type and copying it into a second file type. For instance, you might allow your users to create the monthly newsletter using Word 2007 and then convert it into a Web page on your SharePoint site. On a particular content type, you can determine what file or page layout to convert to, where to store the file, and when to process as high priority or low priority. Other settings for document conversion are located on the Application Management page in Central Administration.

Content Type Inheritance

The ability of content types to inherit is important because it allows us to maintain the content type in a central location and have changes inherited. Everything is about ease of maintenance. Content types inherit in two ways. First they inherit in exactly the same fashion as site columns in that the content type can only be edited on the site it was created on. The content type will be available for any child sites, but it will not be available for sibling sites or parent sites. If you are viewing a site Content Type Gallery that has inherited from a parent site, you’ll notice a link to the source. This link takes you to the site where you can edit the content type.

For example, refer to Figure 3.14. If a content type was made on the Divisions site, only the Divisions site and West site could use this content type; the Products site, Product A, Product B, and top-level site would have access to use the content type. With this in mind, it’s important to plan where a content type will be used and create it at the highest level site possible, typically the root site of the site collection.

Secondly, content types must always inherit from a parent content type. When changes are made to the parent content type, users can select whether they want the child content type to inherit the change. It’s an all or nothing inheritance; that is, all changes are either inherited or not inherited by all child content types. Figure 3.18 illustrates the inheritance of a contract content type. The parent content type is Document, the Contract content type is a child of Document, and the East Division Contract and West Division Contract content types are children of the Contract content type. This allows easier maintenance. If as a company you decide from now on all contracts need to be classified as a type, you can create and add the “type” metadata column to the Contract content type and both the East Contract and West Contract will inherit the change. However, it is important to get the content type definition correct as possible the first time. If you create the contract content type and forget to add the client column until 300 contracts have been created, you will be able to add the column and have it be inherited to all current contracts, but someone will need to populate the information.

Figure 3.18. Content type inheritance.


Multiple Content Types Within a List/Library

Adding multiple content types to one list or library allows you to store different types of content in one central location, which gives you greater power over the organization and presentation of the data. When multiple content types are stored in one library, each content type can only fill in the metadata that applies to that particular content type. Multiple content types are not available by default and need to be enabled. When multiple content types are enabled, an additional section appears on the list settings page to manage the additional content types. These content types are made available to the user on the New drop-down list for the lists shown in Figure 3.19. The owner of the list determines what content types are visible on the New button and the order in which they appear. The content type in position one is the default if the user selects the New button instead of clicking on the New drop-down list.

Figure 3.19. Multiple content types on the New button drop-down.


Exercise: Adding a Content Type to a Library

1.
First you need enable the ability to manage the content types. Navigate to the library.

2.
Select Settings > Document Library Settings.

3.
Under the General Settings header, select Advanced Settings.

4.
Select Yes for Allow management of content types?

5.
Click OK.

6.
A new section has appeared for Content Types as shown in Figure 3.20. Under this section, select Add from existing site content types.

Figure 3.20. Management of content types on a list or library.


7.
Select the desired content type.

8.
Click Add.

9.
Click OK.

10.
To manage the order on the New button, select the Change new button order and default content type check box.

11.
Check the box next to Visible to make the content type available on the new button, and order the content types as you wish (remember the first content type will be the default).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.196.175