Layout & Hierarchy
layout.tpl is the master template for every page on the public site. All other templates extend it.
Template Selection
| Route type | Template |
|---|---|
Blog homepage (/) | home.tpl |
Single post (/post/{slug}) | post.tpl |
Static page (/{slug}) | page.tpl |
| Category archive | category.tpl |
| Tag archive | tag.tpl |
| Date archive | archive.tpl |
| Search results | search.tpl |
Layout Inheritance
layout.tpl defines the HTML skeleton with named blocks. Child templates extend it and override the content block (and optionally others):
{# home.tpl #}
{% extends "layout.tpl" %}
{% block content %}
<div class="row">
<div class="col-lg-8">
{% for post in posts %}
{% include "partials/post-card.tpl" %}
{% endfor %}
{! pager !}
</div>
<div class="col-lg-4">
{! widget_area "sidebar" !}
</div>
</div>
{% endblock %}
Block Reference
| Block | Location | Purpose |
|---|---|---|
head | Inside <head> | Additional CSS, meta tags |
body_class | <body class=""> | Body-level CSS class |
header | Before main | Override the site header |
content | Inside <main> | Required — page-specific content |
footer | After main | Override the site footer |
scripts | Before </body> | Page-specific JavaScript |
Single-Level Inheritance Only
The engine supports one level of inheritance. A child can extend layout.tpl, but cannot extend another child template. There are no grandparent layouts.
Plugin Views Inside the Theme
Plugin public views also extend layout.tpl and are treated identically to core templates — same layout, same global variables, same widget area rendering.