Page Variables

All page related data - title, tags, text and page settings - gets stored as variables in the page's .txt file.
A typical .txt file could be:

title: Hello World
text: Some content here ...

All these variables can be used anywhere in a template (except PHP blocks), wrapped in @p(). For example title:

<!-- A page's title as headline -->

Only alphanumeric characters, underscores "_", dots "." and dashes "-" are allowed in variable names!

Page Variables And The GUI

As soon as you add a new page variable, using @p(var) somewhere in a template, that variable automatically shows up in the GUI on the Data & Settings panel for every page, using that template.

Page Variables As Parameters

You can also use variables in combination with tools or extensions.

Overriding a page's title:

    @t(metaTitle{ title: @p(meta_title) })

A custom logo per page:

<div class="logo">@t(img{ file: @p(logo) })</div>

And the page's text file:

title: Hello World
meta_title: Some better title here ...
logo: image.jpg

Reserved Page Variables

There are a few variables with a special meaning:

  • theme - If defined, the value will be used to override the site's theme for the current page.
  • title - Will be used across the whole site to represent a page within menus or listings. If that variable remains undefined, the last part of the page's URL will be used instead.
  • tags - A comma separated list of tags for filtering, sorting or grouping a page.
  • url - If defined, a page will be redirected to that URL.
  • hidden - If defined and true, the page will be hidden from all navigation elements.
See also