Custom loops with t:list?

Options

Is it possible to create a custom looping with t:list? For instances, I would like to loop over a range of years from 1999 to this current year:

<t:set id="year_range" value="range(1999, year(days(0)))">

<t:list id="year_range">

...

</t:list>

Tagged:

Comments

  • I haven't tested this, but it's worth a shot. First, define a content category year_range and give it subcategories 1999-2009 as you normally would. Then, in your DT:

    <t:data name="years" class="categories" parent="/year_range" />

    <t:list id="year_range">

    Label: <t:value id="label"></t:value>; Name: <t:value id="name"></t:value>

    </t:list>

Categories