Templates
The purpose of this chapter is to reveal and teach everything there is to know about the template system. It describes both the template language and the way the system handles the template files. People previously unfamiliar with Exponential templates should be able to collect enough information in order to understand the following issues:
- What a template is and what it is not
- Template types (page layout, node and system templates)
- Template structure
- The template language
- The main template (the page layout)
- Template variables available in the page layout
- How basic template tasks can be done
- How information can be retrieved from the Content Management System
- The template override system
In this section
- Template basics This section explains the concepts behind templates and the template system. Exponential uses templates as the fundamental unit of site design. A template is basically a custom HTML file that describes how some particular type of content should be visualized. A template file always ends with a ".tpl
- The pagelayout The page layout is the main template. Among other things, it dictates the overall look of a site. The file name of the page layout template must be "pagelayout.tpl". It has to be placed inside the "templates" directory of a design. If Exponential is unable to find a page layout within the current de
- The template language The Exponential template language makes it possible to extract information from the system and to solve common programmatic issues like for example conditional branching, looping, etc. All Exponential specific code must be placed inside a set of curly brackets, "{" and "}". A template file is a comb
- Basic template tasks This section sheds light on some common issues related to template development.
- Information extraction Information that is stored by Exponential can be extracted using the "fetch" template operator. This operator gives access to the fetch functions that a module provides. It is typically used to extract nodes, objects, etc. using the content module. The fetch operator can only be used with modules th
- The template override system The template override system makes it possible to use other templates than the default ones (specified in the code for the different views and templates). This mechanism allows the creation of template overrides for virtually any template that is used by Exponential (including templates that are req
Contributors
- Balazs Halasy Updated
Comments
Add a comment