{assign name="threshold" value="$Think.config.year_max+1"} {volist name="years" id="year" length="$threshold"} {lt name="year" value="$threshold_year"} <!--some code--> {else/} <!--some other code--> {/lt} {/volist}