T
T
themailvnk2015-01-08 14:47:02
PHP
themailvnk, 2015-01-08 14:47:02

How to make 2 conditions in twig?

How to make two conditions in one request in Twig template engine.
So : {% if idgame == editgame & auth == true %} fails.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alex, 2015-01-08
@shoomyst

Decided not to bother reading the documentation?))
twig.sensiolabs.org/doc/templates.html#logic

A
Alexey P, 2015-01-08
@ruddy22

maybe so?
{% if idgame == editgame && auth == true %}
use "&&" instead of "&"

Y
Yuri, 2015-01-08
@error500

{% if idgame == editgame and auth == true %}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question