Skip to content

Directives ​

Textwire directives provide control over your templates through commands that begin with @. These directives enable you to conditionally display content, iterate over data, create reusable layouts, and build modular components. Each directive serves a specific purpose in the template rendering process, allowing you to write dynamic and maintainable templates without mixing complex logic into your presentation layer.

Reserved Names ​

Directive names are reserved keywords. If you need to use one of them as plain text, for example in an email address, escape it with a backslash. Read more about escaping.

For example, me@username.com results in the error syntax error: expected '(' but found 'rname.com', because @use is a reserved directive. Escape it like this: me\@username.com to get me@username.com.