☀ Hey, Automad version 2 is now available as an alpha version.
Read more here!
-
Index
5 pages found
Template Language ⁄
Toolbox
—
Template Language
The Toolbox provides a collection of essential functions for templates. While some are just convenient shorthand functions for more complex statements, others provide the main interface to interact with objects, create redirects and work with query strings.
Template Language ⁄
Control Structures
—
Template Language
As in other languages, control structures in Automad are statements that dynamically determine the flow of an application or website based on evaluating content or variables. Automad knows four different statements to control the flow of the application: for, foreach, if and ...
Template Language ⁄
Snippets
—
Template Language
The snippet statement allows for defining reusable code snippets and is therefore also the basis for any kind of recursion in Automad. A snippet always inherits the context of the calling code. To use a snippet, it is enough to put the snippet's name in statement delimiters.
Template Language ⁄
Includes
—
Template Language
In many cases, different templates across a theme use recurring components such as a header, a navbar or a footer. Those elements can be stored in separate files and included whenever needed. To include such an external snippet, simply wrap its path relative to the current file ...
Template Language ⁄
Using Extensions
—
Template Language
Extensions provide a convenient way of turning custom PHP code into Automad statements. Besides the fact that extensions have to be called by their names including their namespace, the syntax is the same as for Toolbox or pipe functions.