Creating themes

One page, its own layout

A landing page, a contact form, a portfolio grid — sometimes one page deserves a layout none of the others need. Add a template named page-<slug>.html, where <slug> is that page’s slug in the primary language, and FolioPress uses it for that page in every language. Delete the file and the page quietly goes back to page.html.

{# templates/page-about.html #} {% extends "base.html" %} {% block content %} <section class="about"> <img src="{{ page.poster_image_url }}" alt=""> <h1>{{ page.title }}</h1> {{ page.content | safe }} </section> {% endblock %}

The page an admin picks as the contact form page gets a little extra: is_contact_page is true, contact_form_action is where the form should post, and contact_guard_token / contact_honeypot_field are two hidden fields that keep bots out. After a submission, contact_status tells you whether to show a thank-you or an error.

Still need help? Write to us from your site's admin (Support), or email support@foliopress.io.