Layout & Hierarchy

layout.tpl is the master template for every page on the public site. All other templates extend it.

Template Selection

Route typeTemplate
Blog homepage (/)home.tpl
Single post (/post/{slug})post.tpl
Static page (/{slug})page.tpl
Category archivecategory.tpl
Tag archivetag.tpl
Date archivearchive.tpl
Search resultssearch.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

BlockLocationPurpose
headInside <head>Additional CSS, meta tags
body_class<body class="">Body-level CSS class
headerBefore mainOverride the site header
contentInside <main>Required — page-specific content
footerAfter mainOverride the site footer
scriptsBefore </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.