Table of Contents

  • Introduction
  • Templates
    · Introduction
    · <tmplinsert>
    · <tmpldefault>
    · <tmplblock>
    · <tmpldefaultparam>
    · <tmplinsertblock>
    · <tmplinsertall>
    · <tmplinsertexcept>
    · <tmplhelp>
  • Navigation
  • SiteBuilder Tags
  • Examples
  • References
  • Introduction
    WebLayout Templates is an integrated part of SiteBuilder used to separate form from content. It works by transforming content files to HTML files according to a template file. In SiteBuilder the template files are stored in the /template/ directory. The template meta data of a content file determines which template file will be used to transform that content file.

    In the template file you define custom tags and control exactly where tags from the content file get inserted into the resulting HTML page. You can use this control to the point where the order of tags in the content file doesn't matter. Or you can insert the content file as is, with the tag order intact. In the later case the template file will only provide a few custom tags.

    Often you let the template file determine the fundamental layout of the page; where the navigation buttons are, where the title is shown, what the background is, etc. Then the content file gets inserted as is, within the layout defined by the template file.

    When generating the HTML page it is the template file that is evaluated. Any HTML in the template file will be sent right through to the generated HTML page. The template tags <tmplinsert>, <tmplinsertblock> and <tmplinsertall> can then be used to insert tags from the content file, or the entire content file.

    All template tags are evaluated first, to generate a RXML page. The generated RXML page will then be sent through the RXML parser to produce a HTML page. It doesn't matter whether the RXML code is in the template or in the content file, it will be evaluated at the same time.

    The template tags are:

    <tmplinsert>
    Inserts the contents of the first occurrence of a container tag from the content file. It is useful for handling tags that there should only be one instance of, like the <title> tag in HTML.

    <tmpldefault>
    Default value for the <tmplinsert> tag in case a container tag doesn't exists in the content file.

    <tmplblock>
    Defines a new tag or container tag.

    <tmplinsertblock>
    Inserts one or more tags from the content file. All occurrences of the tags will be inserted.

    <tmplinsertall>
    Insert all tags from the content file.

    <tmplinsertexcept>
    Insert all tags from the content file except these.

    <tmplhelp>
    Define a help text for the template, a tag or an attribute of a tag. This help text will be shown when viewing the template source.