Pragmas - bobthecow/mustache.php GitHub Wiki

Mustache pragmas are non-standard extensions to the Mustache spec. They look like {{% THIS }}. Many useful Mustache features were first implemented as pragmas in individual libraries before being added to the spec. This was the case for Dot Notation, implicit iterators, and Inheritance.

[!WARNING] Because pragmas are not yet part of the Mustache spec, they come with a few caveats. They might change or be removed in future releases. They are not supported by some (or all) other flavors of Mustache, so your templates will not be as portable. When they are supported in other libraries, they might be implemented differently.

Supported pragmas

[!NOTE] Prior to v3.0.0, Mustache.php also implemented a BLOCKS pragma, but this is now the Inheritance spec and no longer requires an explicitly enabled pragma.