We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20485
    • 22 Posts
    Hi everyone,
    I just make a list of photos charged in documents with a tv, and than I want to make a list of those photos.
    I used Ditto 3 and modx revo and I make this call:

    [[!Ditto? &parents=`2` &tpl=`icone`]]

    The chunk "icone" is:
    <a href="#[[+ditto_iteration]]" class="cross-link">[[*photo]]</a>

    The tv is configured as an image

    The result is a list of only 2 documents (not 3 as they are) and always the same (first) photo for 2 times.

    Someone can help me please? Thanks in advance
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      In Revolution you will want to use getResources.

      What you’re doing in your template right now is mixing up resource field tags ([[*...]]) with placeholder fields ([[+...]]). You use resource fields when you want to show details from the resource you are currently viewing (like the resource a snippet is on). Placeholders are set by snippets.

      So if you change [[*photo]] to [[+photo]] that would be a step in the right direction.

      I’ve not used Ditto 3 myself, but you may need to specify a specific property to also included TVs, and possible use [[+tv.photo]].
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.