This section explains how themes are defined in Interchange via the STYLE variable and the theme configuration file, theme.cfg.
The STYLE variable in CATROOT/products/variable.txt indicates the template style to be used as the theme for the catalog; the appropriate templates for that theme are found in CATROOT/templates/__STYLE__/. (To change the value of the STYLE variable, either edit variable.txt directly or use the table editor feature of the admin interface.)
The default theme for Interchange is the Foundation demo; hence, the STYLE variable is assigned the value 'Foundation' in variable.txt. The theme is defined in catalog.cfg as follows (line numbers added):
# Here we set up the catalog theme. 1 ParseVariables Yes 2 ifndef STYLE 3 Variable STYLE default 4 endif 5 include templates/__STYLE__/theme.cfg
Variables that make up the look and feel of the STYLE (theme) are defined in the file CATROOT/templates/foundation/theme.cfg, which is read by Interchange in line 5 above.
The file CATROOT/templates/foundation/theme.cfg serves three purposes:
- It defines the THEME and THEME_IMG_DIR variables,
- It defines a cascading style sheet for the theme, and
- It defines the location of region templates according to the traffic settings for the Interchange daemon.
The THEME variable is used to set the location of the region templates in the traffic settings section of the theme.cfg file. It is also used in the cart template definition file (CATROOT/templates/cart) to set the path of an image. The THEME_IMG_DIR variable is used to set image paths in the template region files and the template component files.
The look and feel of the Foundation theme are defined primarily in the cascading style sheet specified in the theme.cfg file. This
The Interchange TRAFFIC setting, defined system-wide in interchange.cfg, is described in the ??document??. The settings in theme.cfg pertain to the location of region templates for the high and low traffic settings. For example, if you need to define a separate set of high traffic templates, you would change the ConfigDir variable in theme.cfg to point to the directory containing those templates.