Using text elements

Text elements are website folder elements which stand for a user-defined piece of text and which may be defined in one page of a website folder and used in another. This way, you can define, e.g., the page title individually in every content page which is then used in the layout page to display the title in the top part of the page.

Text elements have a name and a value. This is how you define a text element:

[element set name="Text element name"]Value of text element[/element]

The definition is to be inserted somewhere into the source text of a page. Once defined, you can use the text element by inserting

[element get name="Text element name"]

into the source text of a page. In the Web view of this page, the text element will be evaluated to its value which replaces the text element.

Text elements defined in the layout page may be used in all content pages of the website folder, e.g. as shorthand notations for often used pieces of text possibly including complex formatting. Text elements defined in a content page may only be used in this same content page and the layout page. If you define text elements with the same name both in a content page and the layout page, the definition in the content page will override the one in the layout page. Thus, you can define default text elements in the layout page, which may or may not be overridden in the content pages. Have a look at the sources of the demo layout and home pages to learn more about the use of text elements.