More notes about FOREACH in Changelog.md
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 23s

This commit is contained in:
Stephen Seo 2024-11-20 16:21:28 +09:00
parent 10bf88ec3e
commit fddc43f36b

View file

@ -22,6 +22,21 @@ FOREACH is used like:
ArrayVar=SecondValue ArrayVar=SecondValue
ArrayVar=ThirdValue ArrayVar=ThirdValue
For multiple variables to expand in FOREACH:
HTML='''
{{{!FOREACH ArrayVar!ArrayVarSecond!ArrayVarThird}}}
{{{ArrayVar}}}
{{{ArrayVarSecond}}}
{{{ArrayVarThird}}}
{{{!ENDFOREACH}}}'''
ArrayVar=FirstVarOnce
ArrayVar=FirstVarTwice
ArrayVarSecond=SecondVarOnce
ArrayVarSecond=SecondVarTwice
ArrayVarThird=ThirdVarOnce
ArrayVarThird=ThirdVarTwice
Implemented nestable "IF" and "FOREACH" expressions in templates. In other Implemented nestable "IF" and "FOREACH" expressions in templates. In other
words, there can be `{{{!IF}}}` inside other IF/FOREACH blocks, and vice versa. words, there can be `{{{!IF}}}` inside other IF/FOREACH blocks, and vice versa.