Elephant uses ElephantMarker as the template parser. It's based on FreeMarker and adds the necessary configuration to operate with the Elephant IConstructor.
ElephantMarker uses a template root to locate templates. The template root is configured in the site.xml
file.
Templates are used at different levels to generate the final HTML, CSS and JavaScript.
Level |
Usage |
Root |
Generate the HTML frame, including html, head and body tags. The template child is |
Layout |
Generate the page layout within body tag. This includes de web page header and its menus, the sidebar, responsive controls and contextual menus. The template child is |
Entities |
Generate the layout for single entities. Usually entities templates are called by content iterators and entities made available to the template using variables. The template child use to have the entity name (ex. contact, dossier, document...). |
The conventional way ElephantMarker uses to locate a template is by searching [templates_root]/[context]/[name]Template.html
. The context
variable is the child explained is the above table and helps to differentiate templates usage. Name is the actual template name and the marker appends Template.html
.
This convention allows the overriding system Overriding templates
.
English | 09/15/20 07:40 | Lluís Turró Cutiller |