Increment value in twig file -


I have a loop with a .twig file that outputs elements.

I have to increase a value with each element. I know how to do this in PHP, but it does not explain how to do it with a twig document. Any suggestions I really can not do in the controller? {/ MyVal = myVal + 10}} {% endfor%}

use it :

  {% set myVal = 50%} {% for item in item}%} {% MyVal = myVal + 10%} {% endfor%}   

, you set {%%} to set prices, set blocks / forms, etc. For output, {{}} is

Comments

Popular posts from this blog

Delphi: missing interface declarations for UI Automation methods -

php - how to change mysql_result($res, 0, "url"); to mysqli -

android - How to attach an image from an app to gmail -