[Templates] Incrementing + outputting a counter value

Jim Spath jspath at pangeamedia.com
Mon Nov 5 23:33:30 GMT 2007


What is the best way to increment and output a counter value?

Ideally, I'd like to do something like this:

   [% tabindex++ %]

But I can only get it to work by doing this:

  [% tabindex = tabindex + 1; tabindex %]

Is there a better way?  I poked around the docs and couldn't find one.

Thanks!
- Jim



More information about the templates mailing list