SharePoint Content Types

A Real-World Example

by Sharee English

ç

 

Sharee English

As one of the fundamental elements of SharePoint 2007, content types provide users with the ability to create reusable, consistent data across their Web platforms.

 

In this example I will show you how to create a content type based on the document content type. In this example we will create a "New Policy" content type for our company so that whenever we create a New Company Policy it has some built-in features. This content type will include a Word template, two new site columns called Effective Date and Expiration Date, a workflow to have the policy approved before it gets published to the general employee audience, and an auditing policy to track when the document gets modified, moved, or deleted. To accomplish this we first need to create all of the items that will go into the content type.

 

Let's start off by creating a Word template.

  • Open Microsoft Word and create a document for the new policy. Mine looks like this:

ContentTypeWordDocTemplate.jpg

  • Save this as a document template named New Policy.

ContentTypeSaveAsTemplate.jpg

  • Close Word.

  • Go to your Site Collection.

  • Go to Site Actions, Site Settings.

ContentTypeSiteActions.jpg

Note: If you are in a Publishing site go to Modify All Site Settings.

ContentTypeModifyAllSiteSettings.jpg

  • In the Galleries Section click on Site columns.

ContentTypesSiteColumns.jpg

  • In the Site Column Gallery page, click Create.

ContentTypesSiteColumnGallery.jpg

  • Create a column called Effective Date.

  • Set the data type to Date and Time.

  • Set Require that this columns contains information to Yes.

  • Set the Date and Time format to Date only, and click OK.

ContentTypeEffectiveDateColumn.jpg

  • Create another column called Expiration Date with the same settings as the previous column.

  • Use the breadcrumb to return to Site Settings.

ContentTypeSiteSettingsBreadcrumb.jpg

Now we will create the Content Type

  • In the Galleries section, click Site content types.

ContentTypeGallerySiteContentTypes.jpg

  • In the Site Content Types Gallery, click Create.

ContentTypeSiteContentTypeGalleryCreate.jpg

  • Create the new content types with the following options and click OK.

ContentTypeNewSiteContentType.jpg

 

I usually encourage clients to place their custom content types into their own custom group. In this example I simply placed them in the default “Custom Content Types” group.

 

Now that the Content Type is created, we need to go add the template and columns.

  • In the Site Content Type: New Policy page, in the columns section, click Add from existing site columns.

ContentTypesAddFromExistingSiteColumns.jpg

  • In the Add Columns page select the Effective Date and click the Add> button.

  • Select the Expiration Date and click the Add> button.

ContentTypeAddColumnsToSiteContentType.jpg

  • Click OK.

You will be returned to the Site Content Type: New Policy page.

ContentTypeSiteContentTypeNewPolicywColumns.jpg

Next we will configure the workflows settings.

  • In the Settings section of the Site Content Type: New Policy page, click the workflow settings link.

ContentTypeWorkflowSettings.jpg

Because this content type was based on the Document content type, it automatically inherited the three workflows; Approval, Collect Feedback, and Collect Signatures.

  • Click the Approval link.

  • In the Change a Workflow: New Policy page set the workflow settings as follows and click Next.

ContentTypesApprovalWorkflowSettings.jpgContentTypesWorkflowNext.jpg

  • The workflows settings can be set to whatever the needs are for the particular content type. In this example set the second page of the workflow settings as follows:

ContentTypesCustomizeWorkflowApproval1.jpg

ContentTypesCustomizeWorkflowApproval2.jpgContentTypesCustomizeWorkflowApproval3.jpg

  • Click OK.

ContentTypeSiteContentTypeNewPolicy.jpg

You will be returned to the Site Content Type: New Policy page.

Finally, we will configure the expiration policy for the content type.

  • Click the Information management policy settings link.

ipl.JPG

  • In the Information Management Policy Settings Page, select  Define a Policy and click OK.

imps.JPG

  • In the New Policy page check the Auditing policy with Editing items, Checking out or checking in items, Moving or coping items to another location in the site, and Deleting or restoring items.

auditing.JPG

  • Click OK.

Our Content Type is now complete. The next step is to attach the content type to a library within the site collection.

  • Navigate to a document library within the site collection. In my example I will navigate to a Sales Team Site, Sales Documents library.

  • Select the Settings Menu, Document Library Settings.

DocLibSettings.JPG

  • In the Customize “Document Library Name” page click the Advanced Settings link.

advSettingsLink.JPG

  • In the Advanced Settings page, in the Content Types section, select Yes on the Allow Management of Content Types.

AllowContentTypes.JPG

  • Click OK.

  • When you return to the Customize page you will see a new section called Content Types displayed.

  • Click the Add from existing site content types link.

AddContentTypes.JPG

  • In the Select site content types from: drop down menu, Select the “Custom Content Types.”

  • In the Available Site Content Types: list box, select “New Policy” and click Add>.

AddContentType2.JPG

  • Click OK.

  • Using your breadcrumb, navigate back to the document library.

  • Click on the New menu. You should see your content type listed in the menu.

NewMenu.JPG

  • Click on New Policy.

  • Your new policy template should open in Microsoft Word. Add some content and save the document back to the document library.

  • Save and Check-in the document. When you save the document you should have to fill-in the required fields for Effective Date and Expiration Date.

NewPolicyInAction.JPG

  • If you encounter a problem checking-in the document you can click on the Edit Properties menu of the document and ensure all required properties are complete and click OK.

DocProperties.JPG

Once the document is checked-in, it will need to go through an approval process before other users can see the document.

  • Click on the Workflows menu of the document.

workflowsmenu.JPG

  • In the Running Workflows section, notice the Approval workflow is currently In Progress.

  • Navigate back to the top of the site, into the Tasks list. (By default workflow tasks go to the Task list of all sites, unless you specify otherwise when we originally set the workflow settings in the Content Type).

  • You should see a task for the Customer Issue Escalation Policy. Once the document is approved all viewers will be able to see the document.

  • In this example I will go ahead and approve the document by clicking on the task and clicking Approve.

ApproveTask.JPG

This is one example of how content types can be used to create consistency across the organization.

 

Sharee English (MCSD, MCAD, MCT) is the Director of Information Services at SeattlePro Enterprises, an IT training and consulting company. She started her career as a programmer, delving into Web technologies almost twenty years ago. Today she is a highly educated executive with background in software development, training, authoring, management, operations, administration and sales. Sharee holds a Master of Arts in Management (emphasis in Information Systems), a Bachelor of Science (B.S.) in Computer Science and a B.S. in Mathematics.


If you would like to provide feedback on this article, please click here.


Copyright ©2010 SeattlePro Enterprises. All rights reserved.