DrupalX

Extension
Framework

Multi-line statements

Usually Twig only supports one single statement per block:

{% if kategorie=="business" %}
{% set farbe="#800000" %}
{% set align="right" %}
{% set spalten=3 %}
{% endif %}

As you can see, this gets quite verbose and confusing quickly as soon as you have more than just a few consecutive statements. DrupalX adds the ability to combine multiple statements - separated by the usual semi-colon you know from PHP:

{% 
if kategorie=="business";
  set farbe="#800000";
  set align="right";
  set spalten=3;
endif;
%}