Mustache and Global data
Our CMS utilizes the Mustache templating engine to dynamically generate content for web pages. Mustache is a lightweight and flexible template language that separates the presentation of data from the underlying logic.
At this link you can find the Mustache documentation.
Mustache templates consist of placeholders enclosed within double braces: {{ }}. These placeholders are replaced with actual content when a page is rendered. The content is provided through a data context, which we refer to as Global Data in JSON format.
This global data is accessible and shared across all pages of the website. It can be consumed from the Mustache template when rendering its skin in the Edit Panel.
It allows you to define certain values or content pieces that remain consistent throughout various parts of your website without needing to duplicate the data for each individual page.
The global data is accessed in the Mustache template through the 'global' variable. For example:
<p> {{ global.information.city }} </p>
When customizing a skin from the Front End Editor, users have access to:
- Within the HTML section
- Block Data: locate elements available in the block.
- Global Data: access to all general data such as hotel name, address, navigation, and languages that can be included in the skin.
- In the CSS section
- Variables: find site colors and fonts to style the skin.