We launched new forums in March 2019β€”join us there. In a hurry for help with your website? Get Help Now!
    • 25876
    • 79 Posts
    Hey folks,

    Here is my (I guess fairly easy) question concerning TVs and Ditto:
    I do have an image-TV called "athlet_img" where a picture can be chosen. Inside the very document, of course, I can address the image with something like <img src="[*athlet_img*]">. Works.

    Now, I need the same image "outside" of the document, in a ditto call. I want to make an overview of all the documents inside a folder, like a blog, but showing the [*athlet_img*] and the [+longtitle+] of every document.

    How can I achieve that? The TV does not work in a chunk (ditto: &tmp=`chunkname`), obviously.

    Thanks for the help,
    Simon
      • 25876
      • 79 Posts
      Aww. Found the solution right now: Using [+athlet_img+] in the chunk instead of [*athlet_img*].

      Simple as that. Wonderful.
        • 28042 β˜† A M B β˜†
        • 24,524 Posts
        The thing to remember about Ditto is that it is working with other documents, but MODx is processing the document it’s called on. So [*...*] will refer to the document it is called on, while [+...+] will refer to the document Ditto is processing, and will be evaluated for each document Ditto processes.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org