Overview#
In Imperia templates, various HTML elements form the basis to enter and store content in the Editmode. This overview provides a summary of the templating elements discussed in previous chapters.
Input Field#
Input fields allow users to enter single-line text, such as article titles or image annotations. They create a variable to store the entered content, which can be accessed using the <!--XX-Name--> placeholder.
Syntax:
<input name="IMPERIA:Name" type="text"/>
Textarea#
Textareas enable users to input multi-line text content. Similar to input fields, they create a variable to store the entered content, accessible via the <!--XX-Name--> placeholder.
Syntax:
<textarea name="IMPERIA:Name" rows="5"></textarea>
Hyperlinks#
Hyperlinks create clickable links within your templates. The URI or target of the hyperlink is specified using the href attribute. You can enable users to enter the link text by including an input field within the anchor tag.
Syntax:
<a href="IMPERIA:name">link text</a>
Select Box#
Select boxes provide users with the ability to choose one option from a list of multiple options. The selected option is stored in a variable and can be displayed in the final document.
Syntax:
<select name="IMPERIA:select">
<option value="option1">first option</option>
<option value="option2">second option</option>
</select>
MultiSelect Elements#
MultiSelect fields allow users to select multiple options from a list. The selected values are stored in an array and can be accessed using bracket syntax.
Syntax:
<select name="IMPERIA:name" size="4" multiple="multiple">
<option value="value">label</option>
</select>
Checkbox#
Checkboxes enable users to select one or more options from a group. Selected values are stored in an array, and individual values can be accessed using bracket syntax.
Syntax:
<input name="IMPERIA:name" type="checkbox" value="value">
Radio Buttons#
Radio buttons allow users to select a single option from a set of choices. The selected value is stored in a variable and can be referenced as needed.
Syntax:
<input name="IMPERIA:name" type="radio" value="value" checked="checked" />
By leveraging these templating elements in Imperia, you can create dynamic and interactive web pages that capture user input, facilitate navigation, and present content based on user choices. Experiment with these elements to enhance the functionality of your templates and provide a rich user experience.