Blog Sections Open
Using ditto_iteration Correctly with Conditional TV Output
The ditto_iteration placeholder is useful until template conditions start hiding some rows. Then the iteration counter may no longer match the visible output, which is exactly what this legacy question ran into. Problem
The ditto_iteration placeholder is useful until template conditions start hiding some rows. Then the iteration counter may no longer match the visible output, which is exactly what this legacy question ran into.
Problem Shape
[[if? &is=`[+tv1+]:=:5` &then=`[+pagetitle+] [+ditto_iteration+]` ]]
If some items fail the condition, the visible list may show positions like 1, 3, 12 instead of 1, 2, 3.
Why It Happens
ditto_iteration counts source items, not only the items that survive your conditional output logic.
What to Do
- move filtering earlier so unwanted items never enter the listing
- or generate your own visible counter after filtering
This is a good reminder that display conditions and dataset conditions are not the same thing.
Troubleshooting JotX After an Evolution CMS Update
A practical note on what to review when JotX starts misbehaving after an Evolution CMS core or custom build update.
Using a Counter Snippet Inside a Ditto Filter
How a custom counter snippet can be combined with Ditto filters when listing logic depends on aggregated child values.