twig if else
// twig if else
{% if process_1 %}
{{ process_1 }}
{% elseif process_2 %}
Only {{ process_2 }} left!
{% else %}
Sold-out!
{% endif %}
twig if else
// twig if else
{% if process_1 %}
{{ process_1 }}
{% elseif process_2 %}
Only {{ process_2 }} left!
{% else %}
Sold-out!
{% endif %}
twig if multi condition
Expressions can be used in {% blocks %} and ${ expressions }.
Operator Description
== Does the left expression equal the right expression?
+ Convert both arguments into a number and add them.
- Convert both arguments into a number and substract them.
* Convert both arguments into a number and multiply them.
/ Convert both arguments into a number and divide them.
% Convert both arguments into a number and calculate the rest of the integer division.
~ Convert both arguments into a string and concatenate them.
or True if the left or the right expression is true.
and True if the left and the right expression is true.
not Negate the expression.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us