The Syntax
What a tag looks like.
All Statamic tags are delimited by double curly braces: {{ }}
.
Whitespace before or after the braces is allowed in most cases.
The braces, however, must stay together.
All of these are examples of valid Statamic tags:
{{ stag }} # our favorite way
{{stag}}
{{stag }}
{{ stag}}
{{
stag
}}
These tags are not valid:
{{ st ag }} # don't use spaces within the tag name
{ {stag} } # curly braces *must* stay together
Tags are Case Sensitive
Tags in Statamic are all case sensitive, meaning that {{ title }}
and {{ Title }}
are two completely separate tags.
All of Statamic’s functionality where it uses variables that you’ve set to do something (for example, title
to name your pages, or _layout
and _template
to change the look of your page) will be looking for all-lowercase names.
When defining your tags, we recommend only using lowercase variable names so that you don’t get confused later on.