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

    I’m having a bit of trouble with Ditto..

    I have a category (parent, id=1)
    And a number of documents (children, id=2,3,4,5)
    And a document with a ditto call referring to a image TV (without using the image widget) in every mentioned children. (child, id=6)

    Like so:
    Category (1)
    -Child1 (2)
    -Child2 (3)
    -Child3 (4)
    -Child4 (5)
    -DittoChild (6)

    I then call the image TVs like this:
    [!Ditto? &parents=`1` &tpl=`xxx` &sortDir=`ASC` &display=`all`!]

    Within the "xxx" chunk I place the <img src="[+image+]" alt="" />..

    My actual problem is that I call the DittoChild itself because it is within the Category but the Ditto child does not have the same TV as the others though it still retrieves an empty <img src="" alt="" /> and that leaves a red cross in IE....

    So my question is: Can I tell ditto to leave out a certain ID from the otherwise needed &display=`all`
      • 7231
      • 4,205 Posts
      Use the filter option to exclude the current doc. &filter=`id,[*id*],2`

      Read more on filtering here: http://ditto.modxcms.com/tutorials/basic_filtering.html
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 13331
        • 67 Posts
        Thank you, I was trying to use the filter but couldn’t figure out the right format... Works like a charm now.