Page Elements
Whereas templates should represent the generic part of a special layout, elements contains the specific parts. Thus, content and layout can be separated. The introduction of page elements stored in a database, brings a lot of advantages, as you will see, when becoming more familiar with the Maxscape. Database elements may be self or predefined somewhat like in XML. For each element an element callback function may be defined. An element is composed of:
ElementNumber
Sequence number of the element. Normally, page elements are evaluated in ascending order.
Element Name
The element name is freely available and should reflect the elements meaning and purpose. How the element is displayed, depends on the page generation context. The name of the element may be used to call a special callback function for the element.
Element Attribute
Element attributes describe the properties of an element and controls the generation behavior and the callback mechanism. Predefined attributes are for example:
- Type="parsed", causes the element to be parsed by the Perl interpreter, thus invoking embedded functions
- Type="execute", causes the element to be executed by the Perl interpreter, thus executing the script, given in the element content
Element Content
The element content contains the content of the element to be displayed. The generation engine offers a lot of possibilities to parse and to filter the element content before delivering the page. Depending on the:
- server, process, category
- page generation type, template type, template
- page template type,
- page template
- element attribute
- element name, attribute, callback function
an element may contain content of the following type:
- HTML
- DHTML
- Javascript
- XML
- (embedded) PERL
- self defined languages
- HTML with mixed Perl variables and function calls (e.g. 'parsedDatabaseFile' PageType)
- Perl scripts