Layout markup
The special parts of the code of a layout.
When you edit the source code of a layout, these parts have a special meaning.
Content area
Pages place their content in this area:
<div id="CMS">
<div class="CMS_widgets"></div>
</div>Editor-only content
An element with the CMS_editor class appears in the editor but not on the public page. Use it for placeholders:
<div class="CMS_editor mainmenu">
<a href="/docs/">Link 1</a>
</div>Menus
This script shows the menu with the given name. If the menu doesn't exist, saving the layout creates it in Navigation.
<nav class="mainmenu">
<script type="text/navigation" name="Main">
{{ foreach m in value.children }}
<a href="{{ m.url }}" target="{{ m.target }}"{{ if m.selected }} class="selected"{{ fi }}>{{ m.name }}</a>
{{ end }}
</script>
</nav>Breadcrumb
<ul class="breadcrumb">
<script type="text/breadcrumb">
{{ foreach m in value }}
<li><a href="{{ m.url }}">{{ m.name }}</a></li>
{{ end }}
</script>
</ul>Placeholders
| Placeholder | What it becomes |
|---|---|
@{year} | The current year |
@{ui} | The address of the UI library script |
$key | The value of a variable |