Basic Template Types

Nowhere in the CMS documentation will you find references to template "types." In CMS, there is truly only one kind of template referred to simply as "a template." However, logically, there are several different types of page templates. For the purposes of learning how to effectively design templates, we can categorize templates as detail, summary, format, and composite.

Detail Template

As we mentioned, you'll probably never see a description of any of the template types we just listed in Microsoft's documentation, but you've probably created pages in your own site that mimic each of these types. Take, for example, a press release in the BOTS Consulting site. You'll notice that all of the content on that page is sourced from that page. In other words, with the exception of the navigation, the content on the page doesn't come from anywhere else in the site the page is the source of its own content. This page could be considered a detail page, since it is the lowest level of the navigation and is the source of content for other portions of the site. In order to create a detail page, you need a detail template. In this case, the press release template we discussed earlier is an example of a detail template. (Refer to Figure 12-1 earlier in this chapter for an example of a press release.)

Summary Template

Now, if you have a number of detail pages, you generally need some mechanism for aggregating all of the content in to a short listing or a summary. A summary template is the next type of template that you'll likely create in CMS. In contrast to a detail template, the summary template is the basis for pages that don't have any content of their own. The only purpose for pages based on a summary template is to summarize the content stored in other pages. For example, if you look at the default page for the press release section in the BOTS Consulting Web site (shown in Figure 12-3), you'll notice that it is a simple listing of all of the press releases in that section. The summary lists the date of the press release, a short title, and a link to the release itself. Again, this page doesn't have any content of its own; it simply aggregates content from other pages. In this case, it's exposing the display name, the start date, and the URL properties.

Figure 12-3. The press release summary in the BOTS Consulting Web site

graphics/12fig03.jpg

Format Template

The next type of template is the format template. As its name suggests, its purpose is to format or reformat content that was entered in the context of an entirely different template. A format template has two distinguishing features: 1) It is not meant to be used by content contributors, and 2) it reformats the content contained in pages created with a different, but related template. The best example of a format template is a "printer friendly" version of a page. Looking at our BOTS Consulting press release in Figure 12-1, you'll notice that there is a link to a printer-friendly version of the release under the title. If you were to click that link, you would see a version of the release that looks like Figure 12-4.

Figure 12-4. A "printer friendly" version of a press release

graphics/12fig04.jpg

Creating a printer-friendly version of a page isn't difficult, even without CMS. However, conceptually, format templates provide even greater possibilities. For example, if BOTS Consulting needed to produce a version of the press release that complied with Americans with Disabilities Act (ADA) Section 508, they would simply have to create a format template that reformatted the content to conform to that standard. Or if BOTS needed to create a Microsoft Word document version of a press release, they would simply need to create a format template that transformed the press release content in to Word (see the following note). The point is that since CMS stores content separately from presentation, you have the ability to take content entered in the context of one template and display it in the context of a different template. Essentially, you would build specific templates to display content in particular formats hence a format template.

NOTE: The ability to transform content from HTML to Word is not a feature of CMS. However, Chapter 36 illustrates a technique for this kind of functionality.


Composite Template

The last type of template is what we call a composite template. A composite template is really the combination of a detail and a summary template. This type of template typically creates pages that have content summarized from other pages within the site as well as sourcing its own content. In fact, this type of template may create pages that are summarized in summary or composite pages. In the BOTS Consulting site, the best example of a composite page is the home page. The home page contains content summaries from the news and case studies sections, but the underlying home page template has three placeholders to allow content contributors to change the call-out graphic, the title, and the body copy.

As you can see from Figure 12-5, there is some content that is unique to the home page, and there is also content being pulled from the company news section. As we mentioned, composite templates produce pages that are a mix of "original" content and summarized content. If you look at the template through the Web browser (Figure 12-6), you'll notice that there are three placeholders on the page as well as the summary of the news section.

Figure 12-5. The BOTS Consulting home page is a composite page that summarizes content as well as sourcing its own.

graphics/12fig05.jpg

Figure 12-6. The BOTS Consulting home page

graphics/12fig06.jpg

As we mentioned before, the categories of templates we provide here are just a way of thinking about your site and template design. We have found this framework to be useful in developing the various components of a template.



Microsoft Content Management Server 2002. A Complete Guide
Microsoft Content Management Server 2002: A Complete Guide
ISBN: 0321194446
EAN: 2147483647
Year: 2003
Pages: 298

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net