We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26388
    • 103 Posts
    I was trying to use Ditto to dynamically generate the XML content used to drive slideshowpro (flash).

    - I have a document setup with a TV to hold an image.

    - I’ve setup a template for the XML
    <?xml version="1.0" encoding="UTF-8"?>
    
    [*content*]
    


    - I’ve created a document with my XML template that holds the basic XML structure needed for slideshowpro and included the Ditto call
    <gallery>
        <album>
            [!Ditto? &idType=`documents` &documents=`[*id*]` &tpl=`xml_project_image` &sortBy=`createdon` &sortDir=`ASC` !]
        </album>
    </gallery>
    


    - My Ditto chunk template includes the placeholders (TV) for the image and pagetitle
    <img src="/[+header-image+]" title="[+pagetitle+]" caption="[+pagetitle+]" />
    


    Now, when I try to load the page using the flash slideshowpro - the flash document calls in the XML file fine but when it does it’s not displaying any images. Reason being, the Ditto call isn’t dynamically pulling in the document’s ID consequently none of the placeholders in my Ditto template are being rendered.

    Any ideas why this would be the case? I know this because if I manually input a page ID like so: &documents=`41` everything renders as expected. However, I’m hoping to dynamically generate this so I only have to have one XML file and one Flash file.

    As a reference, I was following this : http://modxcms.com/learn/solutions/flash-cms.html
      • 22840
      • 1,572 Posts
      Have you tried any of the following for the id call.

      [~id~]
      [+id+]
      [~[+id+]~]
      [+[~id~]+]

      Not sure if that will resolve it but i’ve seen diffrent calls for id’s and there just a few that come to mind. Also I see your calling you ditto call not cached, make sure the page it’s being called on isn’t cached aswell as that may affect it
        • 4058
        • 17 Posts
        scitekmike

        I am having this exact problem. Did you ever figure out a way to get Ditto to call the correct ID instead of hard-coding it in or it pulling the XML Document’s own ID?

        This is a really aggravating setback, for as you know this would be very powerful if it worked. You actually went about it precisely how I did so I am curious how you ended up.