I need my [[+idx]]
tv to start at 0 instead of 1 so I tried this:
[[+idx:decr]]
or [[+idx:substract=
1]]
but it gives me -1 (minus one).
Does anyone know another way to obtain 0?
Thank you
I need my [[+idx]]
tv to start at 0 instead of 1 so I tried this:
[[+idx:decr]]
or [[+idx:substract=
1]]
but it gives me -1 (minus one).
Does anyone know another way to obtain 0?
Thank you
Using this in chunk for getImageList works (at least for me):
[[+idx:decr]]
It gives: 0,1,2,3 ....
P.S. using modx revo 2.3.1
set your template variable default to 0 when you create the variable.
What are you trying to do, your question is vague at best.
UPDATE
ok - what I think will work for you is to write a snippet to do the math... where ever you call the [[+idx]] instead write a snippet
[[!FixIDX? &itemindex=`[[+idx]]`]]
then in your FixIDX snippet just do the math with php and return the corrected index. Though perhaps a custom output modifier would be the better way to go: http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters+(Output+Modifiers)
Though looking at the docs, your code should certainly work - I see no reason for it not to.