The use of predefined page templates for authoring Web content is one of the key defining features of Content Management Server. Page template designers create various page templates, using a combination of HTML and script to define the overall layout of different types of pages. Content authors then choose the appropriate page template from a template gallery for the content they are creating, and drag their specific content into the placeholders in the template, without needing to do any HTML tagging.

Content Management Server 2001 uses another type of template, known as a navigation template, to control the navigation choices displayed for a given channel. In framed sites, navigation templates are used to control the navigation content displayed in the navigation frame. In frameless sites, navigation templates are used to control the content displayed when the current URL specifies a channel rather than a posting.

The previous discussion about framed versus frameless sites stated that the choice between a framed site and a frameless site has significant consequences for how navigation and page templates must be constructed. The names of these different types of templates originated when framed sites were more popular. This is apparent because in a framed site, a given Web page has a navigation template associated with the navigation frame and a page template associated with the content frame. Content authors only need to determine the appropriate page template for the content they are producing, with the choice of navigation template being something determined behind the scenes by the site programmer.

In a frameless site, two distinct approaches are possible. In one approach, the differences between a navigation template and a page template begin to break down. Both types of templates contain similar (or perhaps identical) code for dividing the page into distinct areas by using one or more TABLE, DIV, or SPAN tags. Both types of templates must contain the code required to create the navigation area for the page. And both types of templates must contain the code and/or HTML to create the content to be displayed in the content area.

The largest difference between the two types of templates is that it is still just page templates, and not navigation templates, that contain placeholders to be filled in by content authors. When the URL specifies a channel, a navigation template is used to display the page (this is similar to a URL that specifies a directory in a file-based Web site). When the URL specifies a posting, a page template is used to display the page (this is similar to a URL that specifies a file in a file-based Web site). A problem arises with this approach for many Web site designs because the lack of placeholders in navigation templates prevents standard authoring techniques from being used.

In the second approach, the navigation templates associated with channel URLs are designed to redirect to an appropriate default posting. Sometimes, the default posting is just the one named "default" or "index," or it can be the first posting in the channel. Another alternative is to define a custom property for the channel and use that property to store the name of the default posting for the channel. Note that in Content Management Server 2002, a new property called DefaultPostingName has been added to the Channel object. This strategy must account for the possibility that the channel will not have any postings in it and must be prepared to display something appropriate.

Previous  Next

Microsoft Corporation - Microsoft. Net Server Solutions for the Enterprise
Microsoft .NET Server Solutions for the Enterprise
ISBN: 0735615691
EAN: 2147483647
Year: 2002
Pages: 483

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