Rahul Agrawal
10/08/2023, 2:23 AM{{now offset='3 days'}}
If I need to pick the value from a variable that is defined earlier , instead of a fixed number ( 3 in this example) , what are the ways to do that.
Further, if this variable needs to coming from a loop index - where index is changing with each iteration in the loop, is that possible.Tom
10/09/2023, 8:34 AMconcat
helper to build the offset string e.g.
{{now offset=(concat request.query.offsetDays.0 ' days)}}
Rahul Agrawal
10/09/2023, 8:35 AM{{now offset=(concat request.query.offsetDays.0 ' days)}}
the above syntax seems to have some issues
12:30: found: 'days'', expected: ')'
Tom
10/10/2023, 8:44 AMassign
for the same purpose, however:
{{#assign 'offset'}}{{request.query.offsetDays}} days{{/assign}}
{{now offset=offset}}
Rahul Agrawal
10/15/2023, 11:18 AMTom
10/16/2023, 8:57 AM