## Template Markup Tag Reference Templating System : Designer Guide : Tag Reference

### Overview

The publishing system implements a small number of special markup tags that allow template authors to add dynamic features to their work. The tags allow authors to accomplish four basic tasks that are not possible with standard HTML:

- Embed a dynamic variable in a template (variables).
- Repeat a template section for each object in a dynamic list of objects (`multiple`, `grid`).
- Output different template sections depending on the value of one or more dynamic variables (`if`).
- Provide a mechanism for building complete pages from multiple component templates (`include`).

### Available Tags

- Variables
- `<multiple>`
- `<group>`
- `<grid>`
- `<list>`
- `<if>,<elseif>,<else>`
- `<switch>,<case>,<default>`
- `<include>`
- `<include-optional>`
- `<property>`
- `<noparse>`
- `<master>`
- `<slave>`
- `<formtemplate>`
- `<formwidget>`
- `<formgroup>`
- `<formerror>`

### Notes

- Template tags are processed by the server each time a page is requested. The end result of this processing is a standard HTML page that is delivered to the user. Users do not see template tags in the HTML source code of the delivered page.

- With normal usage, the use of dynamic tags tends to increase the amount of whitespace in the final HTML as compared to the template. This usually does not affect how browsers display the page. However, if a page layout depends on the presence or absence of whitespace between HTML tags for proper display, then special care must be taken with dynamic tags to avoid adding whitespace.

  When placed on a line by themselves, tags that are containers for template sections (`grid`, `if`, and `multiple`) will cause newlines to be added to the page at the beginning and end of the section. This can be avoided by crowding the start and end tags like so:

      <td><if %x% eq 5><img src="five.gif"></if>
      <else><img src="notfive.gif"></else></td>

  Note that this should not be done unless necessary, since it reduces the legibility of the template to others who need to edit the template later.

Last modified: $Id$