CyberStore E-Payment 2023 Documentation
The SitePages.config File

In This Topic

Use the SitePages.config file in the \xml folder to define the pages on your Site. The file is written in a human-readable XML format, which makes it easy to understand and modify.

In short, the file provides the CyberStore page engine with instructions for the display of all of the elements on a page. It also helps define how the various elements interact with a visitor on the Site.

Each control file name is specified (src) along with any configuration options, or properties, you wish to set (e.g., ShowOrderNumberSearch=”true”).

You can see the basic structure of this file below:

The SitePages.config file's XML structure
Copy Code
<SitePages>
    <Page>
        <PlaceHolder>
           <Control />
        </PlaceHolder>
    </Page>
</SitePages>

The tags in the XML structure have the following traits:

Example of a SitePages.config Entry

The following is an example of a typical SitePages.config <Page> entry for the My Account page:

Typical SitePages.config page defined
Copy Code
<Page FileName="customermyAccount.aspx" Themesrc="EcomTheme.ascx" ThemeCss="site/themes/css/Theme.css" RequireSSL="False">
   <PlaceHolder ctrlID="Toolbar">
      <Control src="CatalogSearchControl.ascx" Name="Item Search" SearchControlLabel="Product Search" />
   </PlaceHolder>
   <PlaceHolder ctrlID="RightColumnTop">
      <Control src="CatalogCategoryNavigationControl.ascx" Name="MenuList" />
   </PlaceHolder>
   <PlaceHolder ctrlID="ContentArea">
      <Control src="CatalogContentDisplayControl.ascx" Name="Content Display" FileLocation="MyAccount.htm" />
      <Control src="CustomerLoginControl.ascx" Name="Customer Login" />
      <Control src="CustomerOrderStatus.ascx" ShowDateRangeSearch="true" ShowOrderNumberSearch="true" />
      <Control src="DistributorUploadLinkControl.ascx" />
   </PlaceHolder>
</Page>

In the sample above, the opening tab specifies the page filename, theme (.ascx) file, and CSS file. It also allows you to set the "RequireSSL" option to "true" or "false."

Controls in SitePages.config

Each control referenced in a SitePages.config file determines the specific functionality within a page. These controls are responsible for certain user experiences and handle the processing of various CyberStore activities. You can use the properties within the control entities to set the available control configurations and settings. A property is made up of two parts, a name and a value. It appears the in the following form: PropertyName="Property Value". In the example above, within the ContentArea placeholder inside of the first control, the property appears as Name="Content Display".

Every front-end CyberStore control and its available properties are documented in the Documentation Center under "Technical Reference." Navigate to the Dovetail.Ecommerce.Controls Namespace section.

The typical SitePages.config file above includes the following controls:

"Toolbar" Placeholder

"RightColumnTop" Placeholder

"ContentArea" Placeholder