​pixolino Settings: Templates

Page Templates

​In general, a template consists of one or more page templates—plus optional sub templates. When a user creates a new website, they will have to choose a template to use for the website. When the user adds a new page to the website, they will have to choose a page template to use for the page. This approach allows template developers to create different page templates for different purposes. For example, you could have a page template for pages containing regular content (i.e. texts, images, ...), and another page template for a page containing contact data with a map.

Code sections

HTML section

This section is required. Here you insert the HTML skeleton of the template. Within in your HTML code you should define areas for navigation and areas for dynamic content (PageObjects).

Head section

In this section you can insert additional tags for the <head> area of the pages. Be aware that most of the relevant head section tags are included by the system.

JavaScript section

The scripts in this section are placed at the bottom of each page's source code—right before the closing </body> tag. Always enclose your script within <script> tags. Without them, the script won't be executed, but displayed in clear text.

​Page Templates vs. Sub Templates

A template that can be selected for a page of the website is a page template. Page templates define the design of the whole page. The website's editors can add PageObjects to dynamic slots of the page template and enrich the page with content. Editors select a page template in the page's settings menu.

If you need a design element, which can be used multiple times within a single page—just as the default PageObjects—sub templates come into play. Like page templates they have dynamic slots to store PageObjects. But as they represent just a design element—for example a box—they can be placed within the page template's dynamic slots. Editors can select a sub template via the “Add PageObject” menu of a dynamic slot.

Templates are by default page templates. You can define that a template is a sub template—and not a page template—with the checkbox “Template is a PageObject”.

Unlike regular PageObjects, which are by default available in each dynamic slot and can be deactivated, Sub Templates have to be activated for each slot, in which they should be available. This is achieved with the configuration key “template_sections” in the dynamic slots configuration code.