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