• Resolved s1s2

    (@s1s2)


    I would like to write something like:

    [pass 2016~2021]
    ...
    [/pass] 

    in a programmatic way.

    For example, for the first term (2016, in my example), I’d like to define a variable, while for the second therm (2021, in my example), I’d like to use the today CSS shortcode.

    Example:

    [set startingyear]2016[/set]
    [set endingyear][today format=Y][/set]
    
    [pass list=startingyear~endingyear]
    ...
    [/pass]

    Unfortunately, this approach doesn’t seem to work. Any idea on how to fix it, or how to find an alternative way?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Does this do it:

    [set x]2016[/set]
    [set y][today format=Y][/set]
    
    [pass vars]
      [-pass list={X}~{Y}]
      {-Item}
      [/-pass]
    [/pass]

    It will show:

    2016
    2017
    2018
    2019
    2020
    2021

    Thanks to @polarracing for heads up here.

    Thread Starter s1s2

    (@s1s2)

    I can’t thank you enough. The dash in front of Item was the glaring omission.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Variables in [pass list]?’ is closed to new replies.