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
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.
There are some predefined text elements which you can use without prior definition:
o title: the BSCW name of the current object;
o description: the description of the current object taken from BSCW;
o author: the name of the user who created the current object;
meta:bscw:category: the tags and category assigned to the current
object; other metadata of the current object are also available this way, i.e.
by appending the so-called key of a metadata attribute to
meta:. The keys of the attributes of a metadata profile are
[element get name="title"]
inserts the name of the current page and
inserts the description of the current page. Further you may insert the description of the folder containing the current page using
and the description of the top most website folder containing the current page using
It is also possible to make use of metadata at an unspecified point in the access path to page shown. So
inserts the metadata attribute
bscw:description, i.e. the description, of the lowest object along
the access path to which
bscw:description could have been
assigned. If this object has no description, we get an empty output.