From: Stephen Seo Date: Wed, 20 Nov 2024 07:21:28 +0000 (+0900) Subject: More notes about FOREACH in Changelog.md X-Git-Tag: 1.4~4 X-Git-Url: https://git.seodisparate.com/stephenseo/js/bootstrap.bundle.min.js?a=commitdiff_plain;h=fddc43f36b647f19e777d5c5de77db81c3d6d685;p=c_simple_http More notes about FOREACH in Changelog.md --- diff --git a/Changelog.md b/Changelog.md index f610259..66d8cdf 100644 --- a/Changelog.md +++ b/Changelog.md @@ -22,6 +22,21 @@ FOREACH is used like: ArrayVar=SecondValue 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 words, there can be `{{{!IF}}}` inside other IF/FOREACH blocks, and vice versa.