Page Layout Variables for Solution Sites

There are several page layout variables that are referenced from within the two layout files template\layout1.asp and template\no_menu.asp. The routine Main is responsible for setting some of these to appropriate HTML strings. The others are initialized as described below.

  • htmPageContent. This variable, declared in the file include\setupenv.asp, must be set within the routine Main to the HTML string that will result in the rendering of the main content area of the page. If this variable is not set, no content will be displayed in the main content area. If this variable does not contain valid HTML, the displayed content may not be rendered as intended. Therefore, appropriate care must be taken when writing or modifying the code that establishes the value of this variable.

    This content variable is referenced in the layout files template\layout1.asp and template\no_menu.asp.

  • htmDiscountBannerSlot. This variable, declared in the file include\setupenv.asp, may be set within the routine Main to an HTML string designed to display discounts being offered to the user. In the layout file template\layout1.asp the content associated with this variable is displayed below the menu and main content areas, just above the second horizontal rule (HR element). The layout file template\no_menu.asp does not reference this variable.

    Discounts are generally not appropriate for all pages on a Web site, or even for all pages that use the layout file template\layout1.asp. In such cases, the routine Main should leave this variable empty, resulting in nothing being displayed in the discount area of the page.

    Normally, when discounts are to be included on a page, this variable is set to the string returned by the function RenderDiscounts, defined in the include file template\discount.asp. This function runs a Content Selection pipeline to retrieve discount content, potentially targeted to the user and the contents of their basket.

  • dictConfig.s_SiteName. This value is taken directly from the App Default Config settings. The Dictionary object from which this string is retrieved is created in each page by the file include\setupenv.asp using the GetOptionsDictionary method of the AppConfig object stored in the Internet Information Services (IIS) Application object.

    This value is referenced in the layout files template\layout1.asp and template\no_menu.asp.

  • sPageTitle. This variable, declared in the file include\setupenv.asp, should be set within the routine Main to a string intended to be the title of the page (the data associated with the TITLE element).

    This content variable is referenced in the layout files template\layout1.asp and template\no_menu.asp.

For more information about how the HTML strings assigned to these variables are rendered in a standard location within the Web page, see Page Layout for Solution Sites.

See Also

Implementing the Main Subroutine for Solution Sites

Initializing the htmPageContent Variable

Copyright © 2005 Microsoft Corporation.
All rights reserved.