Note
Traditional script and stylesheet includes can also be used if preferred.
| Created by: | michael | Date: | 08/10/2020 |
Layouts are used to define the template of the site (or a subset of the site).
Typically there will be one layout per site (applied to every page on the site using a /* mapping).
The layout file typically sets up the header and footer used on all the pages and pulls in many of the relevant CSS and Script files that the site uses.
As a CMS user, or indeed a website owner, it is often unnecessary to update/change the layout files at all, but if any changes are required the layout can be edited by selecting CMS - Layouts from the main menu.
This will open a list of the layouts which have been set up. Each layout listed will also show which Host it's applied to (on Multi-host websites).
Clicking on each Layout's name will open the screen to edit the layout.
The General tab is where the layout name and host are set.
The Html tab is where the main HTML content is entered, this also includes {{handlebars}} tags which are used to pull in zones and the main {{content}} from each of the content types. CSS files and Scripts can be included within the HTML using the {{style 'stylesheet name'}} and {{script 'script name'}} tags.
Traditional script and stylesheet includes can also be used if preferred.
The Zones tab is where zones are created/edited, each zone can have one or more "widgets" added to it. If a zone called "menu" is created it can be added to the layouts HTML using {{menu}}. Zones allow the HTML content to be segmented/organised as needed.
The Maps tab is used to configure which pages use this layout (if the layout is used on all pages within the selected host the map entry will be /* - meaning use this layout on all pages.