This section is intended for site designers but maintainers may find it informative.
Under this help page are help pages which define what goes into the various parts of the configuration table.
Overview:
This page provides an introduction to how the site it configured beginning with an explanation of how the system builds pages.
- The system builds each page by taking an HTML outline of the page, called a template, and looking for and replacing special elements, called Tags with page specific HTML. Since certain Tags can pull in content which in turn can contain other Tags this process is repeated (up to three times).
- What does a Tag look like: All tags are begin with '|.' and end with '.|' (e.g., |.popup.| used to define a page which will be used in a pop up, as we will explain later). Some tags, like |.popup.| have a fixed form. Others can contain a variable section, for example the table of contents on the left of this page uses the form |.TOC:SimpleHelp.| In the discussion of each tag we will describe what options the tag has. Site maintainers can get by using no tags. However, one of the more useful tags |.pContent:#.| allows maintainers to use common content. Note: not all Tags are available on all kinds of pages (e.g., a product specific tag is not available on a content page since the there is no way to know what product is being referred to).
- What does a template look like: templates look like standard HTML with Tags embedded in it. Templates come in two forms.
- Full Page Templates: these can be created using a standard HTML editing program. The only stipulation is that all references need to be site absolute not page relative (e.g., 'img src="../assets/logo.gif"' will not work but 'img src="/assets/logo.gif"' will). Depending on the function of the template they will either be stored in the configuration table or as filed in the site's document root directory with extensions of .tpl, tpm. or tp1. Certain programs have fixed template names.
- Line Templates: these are used to generate snippets of HTML code (but they need to have any HTML tag which is started completed, e.g., if you turn on bolding of text with a {b} tag you need to turn if off with a {/b} tag). The line templates are evaluated repeatedly in context. For example the Table of Contents on the left of this help file uses Primary TOC Line once for each top level page and Secondary TOC Line once for each of the pages under the current Page. Usage and format of each Line template will be explained in the appropriate section.
- Style sheets provide a method of controlling the look of a site as well as allowing changes to that look to be consistent across the site.
- While this system does allow site maintainers to select one of several fonts and sizes directly, selecting using styles is the preferred method. Careful use of styles allow the look of the site to be changed by updating the style sheet(s). If fonts are used directly, then a change in the look (say from Times Roman to Arial fonts would require examining each of the pages.
- If an external style sheet is defined in a template then the editor module will display selected styles. For this reason external CSS should be used for all templates except the Secure Buy Page and Thank You page. These external style sheets need to use the following format including lead / and elements in this order:
{link href="/media/helpImages/style01.css" rel="stylesheet" type="text/css" /}
- Site designers can limit what styles they want to appear in editor. For a style name to appear in the editor's drop down list of style the name must begin with a period and the period must be in the first column (i.e., styles which will be called out by class='stylename' not id='classname'). To have a style name excluded from the drop down just put a space before the period. Style names can appear on several lines (e.g., '.important {...' vs. '.important td { ...') but they will appear only once in the drop down. For this reason their names should match their intended use.
- Note: within a Class any HTML can be have a specific sub-style applied to it (e.g., {h2}Title{/h2} would normally be large black text on a white background; however the HTML {span class='important'}{h2}Title{/h2}{/span} might generate red text on a white background, but normal sized).
- FireFox has a "Developer" plug in which allow real time editing of style sheets and saving them off locally for later upload which helps rapid experimenting with changes in style.
- Standard Catalog Graphics: For sites with the catalog/shopping cart module there are a number of images which must be installed in the '/std-img' directory under the site's document root. Images were chosen rather than using Submit Buttons to allow the site designer more freedom to control the look of that page.
- While the system requires a large number of items be defined, this enables the site designer a fine control over the behavior of the site. This is particularly evident in the configuration table. Nearly every program and appearance can be altered by style sheet, template or in special cases with custom site specific programs. Normally these programs will be based on the standard programs with minimum alterations but some sites have been created where the shopping cart actually appears in the product display page.
The Configuration Table This table can have only one record in it and contains:
- A list of the programs which will be called to display the various parts of the catalog.
- Page templates for Catalog pages, Secure buy page, default Content Page template
- Template lines for Category, Products, Table of contents (top level pages and secondary pages), and miscellaneous purchase, shipping and credit options.
Under this help page are help pages which define what goes into the various parts of the configuration table.
- See here for a the definition of the tags listed.
- Catalog Programs selection: while we recommend you use the most current program to display a site's catalog, shopping cart and purchase page, this section allows you to select a specific program. In special cases a site specific program can be chosen.
- Content pages templates:
- The site designer can build several templates. The maintainer in turn selects the appropriate template when building or updating a page.
- Storage: the default template is located in the Client table as the Content Template. Alternative templates are stored in the site's document root with the extension of either .tmp or .tpl. When a page is being built the system will check for one of these alternative templates if the page requires it. If it cannot be found the default template will be used. The name of the file is used in the drop down with the '_' character replaced by a space. The name of the template files can contain only letters, numbers and the '_' character before the '.tpl' or '.tmp' extension. See the special template section below for reserved template names.
Note: if the tag |.popup.| appears on the page's basic content area the system will use the style sheet called out in the default template but build a very simple page with the only a - The page templates, regardless of their location they can contain the following tags: |.popup.|
- Table of Contents Template Lines: these control how the Table of Contents entries will appear.
- Catalog Templates:
- This is where the page templates for the catalog (Category List page, Category/Product list page, shopping cart page), and the secure buy page are defined as well as the special optional templates which are found in the document root of the web site.
- It will also explain where the optional catalog templates (e.g., product page template, thank you page template) are located as well as what special tags they use.
- Category Line is described on the Category page of this help file here.
- Product Line is described on its own page of this help file here.
- The final section of the Configuration Table contains various miscellaneous entries, e.g., special subroutine to handle real time credit card processing.