Most of your view can stay normal HTML. When you need a value, a small expression, or a little browser behavior, you put it inside {{ }}.
Why Brackets#
TemplateX uses {{ }} because they are easy to spot inside markup.
<main> <h1>{{ title }}</h1> {{ content }}</main>The HTML is still the main thing you read. The brackets mark the parts TemplateX should handle.
Print A Value#
A value tag prints once:
{{ title }}That means: print the current title here.
Value tags are not paired tags. They do not need a closing tag.
Use Small Expressions#
Brackets can also hold small expressions:
{{ 1 + 1 }}This prints 2.
You can use this for tiny bits of logic where it keeps the markup readable.