The syntax for describing components and usage has been changed:
-
To create a closable tag, you now need to include # at the beginning and / at the end before the tag name:
{% #set_component ... %} ... {% /set_component %}
{% #component ... %} ... {% /component %}
This is very similar to the endtag in Django Templates.
-
Added slots. Slots are a powerful opportunity to upgrade your components! Slots can accept any content. Each slot has a name, and is specified inside the set_component tag:
{% #set_component "card" %} <div class="card"> <div class="card-header"> <h3>{{ title }}</h3> </div> <div class="card-body"> {% set_slot "body" %} </div> </div> {% /set_component %}
-
Inline tags can still be used, in the old syntax.
The tag engine has been completely redesigned, the context is used more and more globally.