...

Text file src/github.com/noirbizarre/gonja/testData/functions/namespace.tpl

Documentation: github.com/noirbizarre/gonja/testData/functions

     1{% set ns = namespace(found=false) -%}
     2{%- for item in [1, 2, 3] -%}
     3    {%- if item == 3 -%}{% set ns.found = true -%}{%- endif -%}
     4    * {{ item }}
     5{% endfor -%}
     6Found item having something: {{ ns.found }}

View as plain text