Hopefully not the most stupidest question but is there an easy way to have an incrementing number (1, 2, 3...) as a placeholder for each item?
-
☆ A M B ☆
- 24,524 Posts
It’s not a stupid question, but it is too vague. What kind of items? How long does the count need to be kept? For the session? Permanently?
I’ve tried using the [+current+] placeholder in a Ditto tpl, but that didn’t return any values.
[+item+] doesn’t work either - although when you do var_dump($modx->placeholders); in a snippet, and place that below your ditto-call, it lists each Ditto-element inside an item[] array.
The documentation is not very helpful here... a usage example would be nice.
Hallo guys
since the 2.1Beta use [+ditto_iteration+]
ciao, Stefan
-
☆ A M B ☆
- 24,524 Posts
I just wasn’t paying attention and didn’t notice that this is in the Ditto forum