#How to use local vaiables in a template

1 messages · Page 1 of 1 (latest)

tropic drum
#

Can someone please give me an example of a template that uses some local variables? I want to do a complex calculation that involves a bit a math with some boolean logic. I want to do the calculations in the first part of the template and store the results for reference and use later in the template. I'm just not finding (or understanding) what I need in the documentation.
Thanks.

red bolt
#

Variables are instantiated and assigned value using a set statement:
{% set foo = 5 %}