We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14267
    • 113 Posts
    As best as I can tell, Ditto doesn’t return the actual number of a record in a query, or in a page of output. I want it so I can control the complete look of a group of records. I’ve put in this simple hack at about line 2055 (2.1 beta 2):
    $modx->setPlaceholder("recordNumber",$x+1);

    I would obviously rather not have to do a hack--have I missed something, or if not, could I recommend that something like this be incorporated as a feature?
      • 25663 MODX Staff
      • 12,272 Posts
      I’d post that to the Ditto trac install so Mark can get it into a future release.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 18397
        • 3,250 Posts
        Yes, please do.

        I stand corrected, something similar has already been implemented in the development versions as ditto_iteration (the value of $x through the iteration).