Design Templates
A design template is just another HTML file that - in general - includes
a
<PRO ACTION="insert_body">
statement.
This design template is used every time when SiteC generates a
file in the destination directory: Instead of just writing out the
soure file, the design template is used with source file being inserted
at the "insert_body" statement.
Purpose
Using design template you can do several things with you HTML-pages:
- Define a common design for all HTML-pages in a certain subdirectory
- Allow for different design template in different directories.
See below for an explication of the inheritance mechanism.
- Change design elements, depending on properities of the current
file. For example, highlight the reference to the current file
in the navigation bar.
- Do whatever you want. You can insert arbitryry Prolog
statements with full access to all attributes
of the current file and with access to the Description
Logics database which allows you to refer to other files.
Inheritance
To determine the design template for a certain subdirectory, SiteC
searches with the following strategy:
- If a design template exists in the current directory, take
this. The name of the design template is "design.tpl" by default,
but can be changed in the configuration
file.
- Check for the next higher directory. Repeat this until the
top of the "source_dir" (see configuration
file) is reached.
- If nothing was found, take the default design template, defined
in the configuration file.
|