Channels store pages and provide the hierarchical structure for CMS sites. This structure determines the overall navigation for your site and is similar to a virtual directories structure for IIS-based sites. However, there is an important difference: In CMS, no actual disk directories are used for storage; instead, the content is stored in the SQL Server database and is organized in channels. The Site Manager provides a GUI that allows us to organize and manage the hierarchical channel structure.
NOTE: Channel hierarchy implements the information architecture of your site. We have created the channel hierarchy for our sample site in Chapter 9. The Site Manager provides the ability to perform usual administration tasks, such as creating, renaming, and deleting channels, as well as CMS-specific channel configuration tasks for example, setting up channel rendering options and sorting order. Site administrators, channel managers, and template designers can create and administer channels. To display the channels hierarchy, click the Channels icon in the left pane of the Site Manager window (Figure 16-1). Figure 16-1. Channels hierarchyConfiguring Channel PropertiesYou can configure an existing channel by using the tabs within the Properties dialog box. To display the Properties dialog, right-click the existing channel and select Properties.
NOTE: Some configuration options can be set up when you create a channel using the New Channel dialog; the tabs in the New Channel dialog provide access to the subset of options accessible via the channel's properties. The Properties > General tab (Figure 16-2) allows us to change the display name of the channel and the channel description. As we have discussed in previous chapters, the display name is a user-friendly alias that is used as text for a link pointing at your channel when the channel is presented to the users for example, within a navigational structure for your site in a browser. The Display Name property can contain non-US-ASCII and spaces, which is very useful for multilingual sites. Figure 16-2. Channel general propertiesThe Description property allows us to provide a meaningful description of the channel content; it is an optional property. The Description field is limited to 256 characters in length and is mainly used for site maintenance. The General tab also shows when the channel was created and by whom, the locking owner, and when and by whom it was last modified; this information is read-only and can't be changed. The name, display name, and the description of a channel can also be changed from the Web Author by using the Channel Properties dialog (Figure 16-3). Figure 16-3. Channel Properties dialog available from the Web Author consoleThe Properties > Publishing tab (Figure 16-4) provides access to the channel rendering and lifetime settings as well as the channel options. Figure 16-4. Channel publishing propertiesThe Options section on the Publishing tab (Figure 16-4) provides access to four channel publishing options; the first two options are also available from the Web Author using the Channel Properties dialog (Figure 16-3).
NOTE: Pages within the channel have their own robots META tags (refer to Chapter 6 for details of the robots META tags). These are configured by authors, using Page Properties in the Web Author console or Advanced Page Properties in the Authoring Connector. Automatically, the channel robots META tag configuration settings apply only to the channel rendering. However, programmatically they can be used anywhere in the site for example, for generating META tags for some or all pages or subchannels within the current channel. The Lifetime section on the Publishing tab (Figure 16-4) defines the channel's publishing schedule. Click the Set button to display the Set Channel Lifetime dialog box (Figure 16-5), where you can set the Start Publishing and Stop Publishing options. The channel's publishing schedule can also be changed from the Web Author by using the Channel Properties dialog, as shown in Figure 16-3. Figure 16-5. Channel lifetimeStart Publishing defines the server date and time when the channel becomes available on the live site. You can define the exact date and time or make the channel visible immediately. If necessary, you can set the start publishing date of the channel to the day of your choice in the past. However, using the Site Manager, you cannot set a start date that is before the installation date of CMS.
NOTE: You can set a channel start date that is before the installation date of CMS by using the Publishing API. In this case, the Site Manager accepts a new date. Stop Publishing defines the server date and time when the channel stops being available on the live site. However, it is not deleted from the Content Repository and remains visible from the Site Manager. The following list describes the Stop Publishing options.
The Channel Rendering section on the Publishing tab defines what is displayed in the browser when the channel is accessed by its URL, without a page name. To configure the options, click Select. The Select Channel Rendering dialog box is displayed, as shown in Figure 16-6. This dialog allows you to specify the page that should be used as the default page for the channel, as well as whether any additional processing should occur on the server. The default page can be defined in one of two ways.
Figure 16-6. Channel rendering propertiesIn the Channel Rendering section, you can specify a script to be executed when content in the channel is accessed. This script is called a channel rendering script, or just a channel script; it is also referred to as a channel outer script. This setting is optional. The script can be either an ASP or ASPX page for mixed mode sites, and only an ASPX page for ASP.NET sites. The channel script is defined by its location in the IIS virtual site; this location should be typed in manually, there is no browse button. The channel script can perform any processing that is required by the logic of your site for example, combine pages in a frameset, verify the security credentials, redirect the user to another channel or page, or display a list of all pages in the channel. The No and Yes radio buttons define whether the channel script is executed only when the channel URL is requested or when the channel URL as well as all page URLs within the channel are requested. For example, if Yes is selected, then the channel script will be run for the channel requests (http://<site>/<channel>) as well as page requests (http://<site>/<channel>/<page>). On a framed site, a channel rendering script contains the frameset and must run when a user browses either to a channel or to any page in the channel. For example, a sample channel script is configured for the root channel node Channels when you create your site. The script is called McmsHomeport.aspx and is located in the folder <installation point>\Server\MCMS\McmsHomeport\. By default, this folder is mapped to the virtual directory /MCMS/MCMSHomeport on the IIS virtual site that is configured as the CMS Web entry point. It provides an ASPX page that is displayed for an empty CMS site with no pages. The page lists the CMS Web applications on the IIS virtual site and provides a brief description of CMS and the links to support information on the microsoft.com site (Figure 16-7). Figure 16-7. Sample channel rendering scriptA channel may contain no pages only subchannels. This configuration can be used, for example, to organize the content in channels in a logical way for a site and to provide better navigation through the site's content. However, if a URL points to a channel, we still need to provide a browser with a page to display. The Navigation URL box does exactly that it specifies what to return to the browser if there are no pages in the channel. Usually, it will be a page that provides links to the content of the channel; therefore, the URL is referred to as the Navigation URL. The Navigation URL can be a frameset. You need to type in the URL manually. In effect, this box provides a simulation of HTTP redirection on the server side.
NOTE: You can also use a channel rendering script to dynamically generate a navigation page for a channel with no stored pages. The Navigation URL is mostly used for compatibility with CMS 2001. If there is no script or Navigation URL configured for a channel without stored pages, then the default channel cover page provided by CMS will be displayed when a browser points to a channel URL. The default page is an ASP page called Cover.asp, located in the folder <installation point>\Server\IIS_NR\Shared\. For example, Figure 16-8 shows the channel cover page displayed on our sample site for the top-level channel botsconsulting. If we click the root node Channels, the channel rendering script will be displayed, as shown in Figure 16-7. Figure 16-8. Channel cover pageFor a nonroot channel, the channel rendering properties can be inherited. Click the Copy From Parent button (Figure 16-6) if you want the settings to be the same as for the parent channel. You can apply the channel rendering settings to the subchannels by selecting the "Apply to descendents" check box in the Channel Rendering section on the Publishing tab (Figure 16-4). The Publishing > Web Authoring tab allows you to set up the default template and resource galleries for the channel (Figure 16-9). Figure 16-9. Setting up the default template and resource galleries for a channelBoth settings are optional. However, it makes sense to assign the default template and resource galleries to the channel since these could be accessed programmatically using the Channel.DefaultTemplate Gallery and Channel.DefaultResourceGallery properties. Using these properties we can, for example, customize the Web Author console. It is worth mentioning that the content authors don't have to use the default gallery; they can select another one if they wish. Another benefit of assigning the default galleries is that the site administrator can see explicitly who needs rights where. It's a good practice, one of those "nice-to-haves." A gallery can be a default gallery for more than one channel. Setting up the default galleries is easy: Browse to the gallery that is to become the default gallery by clicking the ellipsis button (Figure 16-10), select it, and click OK. Typing the gallery name in a box is not allowed; you have to browse to it. If you want to clear an entry, use the Clear button. Figure 16-10. Select Template Gallery dialog boxThe Publishing > Sorting tab (Figure 16-11) specifies the order of the items contained within the channel. The items may be pages or channels. The position of an item within the list can be changed using the Up and Down buttons. Figure 16-11. Channel sorting orderThe purpose of this ordered list is twofold.
The Publishing > Rights tab assigns the CMS rights groups to a channel (Figure 16-12). Make sure you assign at least one subscribers rights group to the channel; otherwise, ordinary users may not be able to view content in the channel on the live site. If you want your channel to have the same group assignment as its parent channel, click Modify and then click Add Parent's Rights. We will focus on setting up user rights in the next chapter. Figure 16-12. Channel rightsThe Publishing > Custom tab allows you to set up the custom properties for a channel (Figure 16-13). A custom property is a name/value pair associated with a channel. A channel can have multiple custom properties. Different channels and pages can have the same custom properties. After the custom properties have been defined for a channel, their values can be assigned or changed from the Web Author by using the Channel Properties dialog > Custom tab, as shown in Figure 16-14. Figure 16-13. Custom tab of the Channel Properties dialog in the Site ManagerFigure 16-14. Custom tab of the Channel Properties dialog in the Web Author
NOTE: Custom properties for CMS pages are defined in their corresponding templates in Visual Studio .NET. The values for custom properties are assigned by content contributors, using the Web Author or the Authoring Connector (refer to Chapters 5 or 7, respectively, for a detailed discussion). Custom properties can be used programmatically for example, to present the user with the channels and pages that share a particular property value. If custom properties are created consistently across a number of channels and pages, then you can provide additional functionality for the site. The key here is the word "consistently." Defining custom properties should be part of defining the overall architecture of your site. For example, let's say that we created a custom property for a brief summary of content provided within a channel. We could then use this summary as additional information we present to the user in the navigation structure for instance, when a user's mouse is over the channel's display name.
NOTE: Custom channel properties can be created only using the Site Manager. The current version of the Publishing API does not expose a method to create custom channel properties programmatically. This limitation, combined with the inability to manage user rights programmatically, can hinder efforts to use automated scripts to create large numbers of channels. Setting up a custom property involves giving it a name, selecting the type of the property, and defining its values. The New button allows you to set up a new custom property; the Modify button provides the ability to change the values of the existing properties; the Delete button deletes the selected property. The custom property name can be up to 45 characters in length. There are two types of custom properties: text and selection.
As we discussed in Chapter 6, custom properties are typically used to generate Keywords and Description META tags for the internal and external search engines. Custom properties can also be used to categorize content across the site. Authors apply the values to the predefined custom properties when they add content using the Web Author; the actual META tags are created at runtime programmatically. In the code, developers retrieve the content stored in the custom properties and insert it into the META tags in the HTML header using the Channel.Custom Properties collection. That's all about creating and configuring channels. The other tasks we need to look into are renaming, moving, copying, and deleting channels, as well as moving, copying, and deleting the pages within the channel. Performing these tasks for the channels inside the Site Manager is like working with folders inside Windows Explorer. Renaming a ChannelTo rename a channel in the Site Manager, right-click the channel you'd like to rename, select Rename, and type the new name. This name will be used as a part of the URL. If you want to change the channel's display name, you can do it from the Properties > General tab. You can rename all channels, including the default root node Channels. The Name and Display Name properties for a channel can also be changed from the Web Author console using the Channel Properties dialog (Figure 16-3). Moving and Copying a ChannelRight-click the channel you'd like to move or copy, and select either Cut or Copy; then right-click the channel where you want the channel to be moved or copied, and click Paste. As we have already mentioned, the Site Manager doesn't enforce the uniqueness of channel names. This is because the name of a channel is not used as its unique identifier. Instead, each object in the Content Repository has a GUID assigned to it. Two channels with the same names have different GUIDs; hence they are treated as two independent objects within CMS. If the publishing schedules of two channels with the same name overlap, both channels will be displayed in the browser. It could be quite confusing for users. Therefore, it is important to rename the channel after you've copied it, or make sure the publishing schedules of channels with the same names do not overlap. The expiration date and time of one of the channels must precede the start date and time of the other channel. You can dovetail the publishing schedules to make the second channel with the same name available at the same time the first one expires. This technique allows seamless site updates. Deleting, Removing, and Restoring a ChannelTo delete a channel, right-click the channel and click Delete. Deleted channels are moved to the Deleted Items container. From there, you can either restore the channel or remove it permanently. To remove the channel permanently, open the Deleted Items container, right-click the channel, and select Delete. To restore the channel, move it from the Deleted Items container to where you'd like it to be restored. Moving, Copying, and Deleting Pages in a ChannelTo move or copy a page using the Site Manager, right-click the page you'd like to move or copy and select either Cut or Copy; then right-click the channel where you want the page to be moved or copied to, and click Paste. CMS allows pages with the same names to be stored in a channel. Each page is identified by its own GUID, and is therefore completely independent and has its own set of properties, including the name and the publishing schedules. To avoid confusion, make sure the publishing schedules for pages with the same names do not overlap. You can use the same technique for consecutive updates as for the channels: Set the start date of the new version of the page to the expiration date of the version you'd like to replace.
NOTE: Pages that are copied or moved individually will have to be approved for publishing in the normal way, using the publishing work flow configured on their destination channel. If the content of the moved page hasn't been changed, it only requires moderator approval. However, if you move the channel containing the page, then the page does not need reapproval. To delete a page using the Site Manager, right-click the page and click Delete. Deleted pages are moved to the Deleted Items container. From there, you can either restore the page by moving it back in the channels hierarchy, or remove it permanently by right-clicking it and selecting Delete. If you'd like to permanently remove all pages and channels in the Deleted Items container, right-click it and select Clear Deleted Items. You can move, copy, and delete pages using the Web Author console; we discussed how to do it in Chapter 5. There are some differences in implementation of the functionality between the Site Manager and the Web Author. For example, pages deleted from the Web Author console are not moved to the Deleted Items container and can't be restored. |