Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


January 2008

Using Content Types in Windows SharePoint Services 3.0

Categorize and organize your SharePoint libraries and lis
RSS
Subscribe to Windows IT Pro | See More Windows OSs Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Executive Summary:
SharePoint Content types are a new innovation in Microsoft Windows SharePoint Services (WSS) 3.0 that let you better categorize and organize your SharePoint data. SharePoint content types let you store the same type of content in multiple locations, as well as store multiple types of content in the same location. This article shows you how to create and customize a content type and associate it with a document library.


One of the concepts at the core of Windows SharePoint Services (WSS) 3.0 is the improvement to document storage called content types. In WSS 2.0, each list (whether a document library or a regular SharePoint list) was bound to a single schema, and the schema resided within that list. With the content type innovation, a list can contain multiple schemas, and a schema can be used in multiple lists. The schema for a content type can include metadata (which would appear as columns in a SharePoint list), document templates, workflows, the document information panel, and other customizations. What this all means is that you can store the same type of content in more than one list and store more than one type of content in the same list, thus eliminating the need for multiple libraries containing information that you’d like stored in the same place. In this article, I walk you through the process of creating and customizing a content type and associating it with a document library to achieve the benefits of this useful innovation.

A Sample Library with Multiple Content Types
Let’s begin by taking a look at a document library that contains multiple content types. In the example that Web Figure 1 shows, a company’s sales team maintains a document library for various types of sales documents, including sales presentations, financial analyses, and RFP responses. The most obvious effect of content types on this library is the ability to choose different templates for the different types of documents. Thus, when you click the arrow beside New, you get a choice of the available content types.

Notice that the various content types in this library have different columns of metadata. For example, the column Deal Size contains only data for the Financial Analysis content type. Also note that all of the content types contain information in the Client column.

The template and metadata columns are two key parts of the schema for a content type. In earlier versions of SharePoint, assigning different templates and metadata columns would have required the creation of multiple document libraries. Now, let’s look at the process of creating content types.

Creating a New Content Type
When creating a content type, you first need to decide whether you want to create it on the root site level, the child site level, or the list level. Essentially, if you create the content type on one of the site levels, it will be available for all child sites and lists in that site collection; if you create it on the list level, it will be available for that list only. For example, the document library that Figure 1 shows resides at moss.litwareinc.com/SalesNew/SalesDocument; that is the Sales Document library in the new sales site, which is a child of the Litwareinc site. When creating a new content type that can be used in this document library, you can either create it at the Litwareinc (root site) level, at the New Sales (child site) level, or the Sales Documents (list) level. As a general rule, I find it best to create content types at the highest level possible because the content type will then be available to as much of the site as possible. There are, however, several reasons you might want to create a content type at an individual site or list level. For example:.

• You want to restrict use of a content type to a particular list.

• Your content type needs to incorporate columns created at the list level.

• You lack permission to create the content type at a higher level.

• When creating a child content type based on an existing content type, you might want to have the parent on the site level but the child on the list level.

I’ll show you how to create a content type at the root site level, but the steps are basically the same for creating content types at the child site or list level. To create a content type, select Site Actions, Site Settings, Modify All Site Settings. This choice will bring up various settings, including the list of galleries, which contains an option called Site content types, as Web Figure 2 shows. Click Site content types to display the available content types. Select the option to create a new content type, which opens the content type creation form that Web Figure 3 shows.

I’ve chosen to create a content type for writing letters because you might want to use such a content type throughout your organization, and using content types will let you use a company letter template, with consistent letterhead and formatting. The Parent Content Type choices affect what settings will apply to the content type. For our letter content type, we’ll base the content type on one of the basic out-of-the-box content types. Choosing the Document parent content type will result in the content type having a blank Microsoft Office Word document for its template, minimal metadata columns, and no further customizations. You can also choose to place your new content type in an existing or custom group. Placing the content type in a group makes it easier to find when you want to work with it later.

Customizing a Content Type
Now that we’ve created our content type, we want to customize its schema to maximize our benefit. The screen that Web Figure 1, at www.windowsitpro.com, InstantDoc ID 97483, shows will appear after you create the content type. You can also access this screen through the site content types gallery or by clicking the content type in Document Library Settings after you’ve associated the content type with a list. On this screen you can select or change the following settings:

Name, description, and group. These options let you change the settings you chose when creating the content type.

Advanced settings. These primarily let you choose a template. You can choose as a template any document to which you can browse, whether it resides on your site or locally. Note also that you don't need to select a template file (such as a .dotx file for Word).

Workflow settings. These let you select a workflow to be associated with a content type. This option is one of the most compelling parts of using content types because it lets you have different workflows for different content types within the same document library and lets you reuse the workflow setting on additional document libraries without the need for reconfiguration. When you select Workflow settings, you’ll be able to choose from the out-of-the-box workflows or any custom Visual Studio workflows. Currently, you can’t associate SharePoint Designer workflows with a content type. Let’s hope this functionality is coming. After you associate a content type with a list, however, a SharePoint Designer workflow can be developed and attached to the list.

Document information panel settings. These let you upload or modify the document information panel that documents created with the content type use. As you can see in Figure 4, page 62, the document information panel is an Office InfoPath form that serves as a properties pane for documents that open from SharePoint. It links metadata columns to the document, and you can drive a lot of the business logic in your Word document with the declarative rules engine of InfoPath, without having to write any code. On this form, you can upload a custom information panel (an XSN, or InfoPath form template file) and choose whether you want the information panel to always open by default.

Information management policy settings let you define or associate custom policy settings with the content type.

Manage document conversion for this content type settings. Choosing this option requires that document conversion be enabled for your site collection. (An administrator must enable document conversion in Central Administration.)

Continue to next page

   Previous  [1]  2  Next 


Reader Comments
links to Web Figures do not work

nmansour January 18, 2008 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 24, 2008

An often irreverent look at some of the week's other news, including a Vista Capable dismissal request, Zune price reductions, Morrow musings, Novell and Microsoft sitting in a tree ... two years later, Yahoo!, IE 6 on Windows Mobile, and so much more ...

The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing