the intended purpose of latte tag {var} is to fill values into variables, while on the other hand the purpose of latte tag {do} is just to execute one line of code.
At the time being unfortunately it is not possible to use destructuring array into variables like this:
This destructuring would be in Latte templates useful, because there are many cases when you need put a type into template and insight the template get more than one variables for example a) text message, b) css class.
Now it is possible to use for this purpose tag {do}:
But it would be better to use for assigning variables tag {var}. Destructuring array into variables is natural way of assigning variables in PHP and shoud be supported by the tag {var}.
Hi,
the intended purpose of latte tag {var} is to fill values into variables, while on the other hand the purpose of latte tag {do} is just to execute one line of code.
At the time being unfortunately it is not possible to use destructuring array into variables like this:
This destructuring would be in Latte templates useful, because there are many cases when you need put a type into template and insight the template get more than one variables for example a) text message, b) css class.
Now it is possible to use for this purpose tag {do}:
But it would be better to use for assigning variables tag {var}. Destructuring array into variables is natural way of assigning variables in PHP and shoud be supported by the tag {var}.