Definition

The XML definition of the template is a simple list of fields. Each field in the definition represents a field in the page editor.

Example XML for template definition (7.1)

<fields>
    <field name="dateField" type="date" />
    <field name="oneLine" type="text_field" />
    <field name="oneLineWithValidation" type="text_field" regexp="\d{1,3}"/>
    <field name="manyLines" type="text_area" />
    <field name="richText" type="html" />
    <field name="checkBoxes" type="checkbox">
        <option default="true" title="My Value" value="my_value"/>
        <option title="Other Value" value="other_value"/>
    </field>
    <field name="radio" type="radio">
        <option default="true" title="My Value" value="my_value"/>
        <option title="Other Value" value="other_value"/>
    </field>
    <field name="combos" type="combobox">
        <option default="true" title="My Value" value="my_value"/>
        <option title="Other Value" value="other_value"/>
    </field>
    <field name="list" type="list">
        <option default="true" title="My Value" value="my_value"/>
        <option title="Other Value" value="other_value"/>
    </field>
    <field name="photo" type="image"/>
    <field name="number" type="number"/>
</fields>

Attributes

  • name = name of the field.
  • type = type of the field, see below.
  • regexp = Optional regular expression for the field validation.

Field types

  • date date field with calendar popup.
  • html FCKEditor for rich text editing.
  • checkbox checkbox group with defined option values.
  • radio radio button group with defined option values.
  • combobox combobox group with defined option values.
  • list list with defined option values.
  • image image selector.
  • number number, stored as BigDecimal.