We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7319
    • 21 Posts
    Hi all,

    i have a product listing where 7 item per page are displayed by ditto. Is it possible to somehow get the number of the items place in the listing on the page and use it as a placeholder?

    I want to use those numbers to add them to their css ids so that they are unique (like: id="idName[+placeInListing+]" which would output something like: idName1, idName2, idName3 etc.)

    I hope that I somehow managed to make clear what I mean. Basicallly I just want to have 7 different id´s which I can assign to those Items based on their place in the listing.

      • 4310
      • 2,310 Posts
      Not very well documented but...
      id="idName[+placeInListing+]"
      Becomes =>
      id="idName[+ditto_iteration+]"

      smiley
        • 7319
        • 21 Posts
        Perfect! Thanks a lot. This placeholder should definitely make it into the wiki.