During initial development, programming tasks comprise much of the work involved in getting a Content Management Server Web site up and running. Some sample code is included with Content Management Server, but almost all Web site development projects will significantly modify this code, so you could start from scratch to produce the customized functionality that is typically required.

A comprehensive demonstration of the types of coding that are common is far beyond the scope of this chapter. Rather, this final section of the chapter will provide detailed explanations of a routine called BuildTopNavTable, implemented in two different ways. First, the routine as it might be coded for a Content Management Server 2001 implementation, using the COM-based Publishing API from Microsoft Visual Basic Scripting Edition (VBScript), will be shown. Second, the routine will be shown as it might be coded for a Content Management Server 2002 implementation, using the .NET-based Publishing API, the .NET Framework, and Visual C#.

Note that unlike the implementation sections in some other chapters, the code in this chapter was not borrowed from an existing product sample. It was devised specifically for this chapter, and has been commented exclusively with annotations in italic font that should not be considered part of the code itself.

The functionality of the routine BuildTopNavTable is the same in both implementations, although some of the details are different. For example, in the COM-based VBScript version, the result is returned as a string that contains the HTML that will display the constructed table. In the .NET Visual C# version, the result is returned as an object of class Table from the namespace System.Web.UI.WebControls, which can then be added to the controls on the page.

The routine is called BuildTopNavTable because it builds a horizontally oriented list of hyperlinks to the top-level channels in a Content Management Server Web site. These hyperlinks are implemented as an HTML table with the following characteristics:

  • The table contains a single row.
  • The single row contains one cell for each sub-channel of the root channel in the site.
  • The text in each of the channel cells is the display name of the channel.
  • The channel cells are ordered alphabetically according to their names (as opposed to their display names).
  • The channel within which the current channel is contained is shown in bold font, and is not a link to that channel.
  • All other channels are shown in regular font, and are constructed as links.
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 © 2008-2017.
If you may any questions please contact us: