Have set up Ditto to display thumbnails in the past with success, however this one’s got me stumped - and I’m using the same method as in the past! Just can’t get it to display any of the values for the TVs I’ve created - it only displays the default placeholder values, like [+pagetitle+], etc. I’ve checked and rechecked my work without luck. I’m using 0.9.6.2 and Ditto 2.1. I’ve checked the custom document object variables directly on a normal page in a normal template and they work fine.
Ditto call:
[[Ditto? startID=`[*id*]` &depth=`1` &display=`all` &showPublishedOnly=`1` &hideFolders=`1` &tpl=`itemSummary`]]
Template chunk:
{{itemSummary}}
<div class="item clearfix">
<a href="[~[+id+]~]"><img src="[+itemThumbnail+]" alt="[+longtitle+]"></a>
<span class="item-name">[+pagetitle+]</span>
<a class="item-button" href="[~[+id+]~]">+</a>
</div>
TV:
[*itemThumbnail*]
Have tried cached and uncached too.
Mostly harmless.
Is {{itemSummary}} part of the tpl chunk? If so I think it is a loop to itself. Other than that it seems that it should work. Make sure tha document you are testing it on has children and are published.
Tip: &startID is no longer used, use &parents or &documents depending on the objective.
How does it change when you call Ditto uncached ( [!...!] ) ?
Caching makes no difference, neither does using &parent &documents, giving the same result. I’ve used the same methodology on another site with success, so I can’t believe this isn’t working. I just downgraded Ditto to 2.02 to match the version on the other site where I have the same thing working, but no luck. The docs are published under the parent, the parent template contains the Ditto call above, which appears to be working, displaying summaries of the child docs as determined by the styling in the template chunk {{itemSummary}}. The default tvs are displaying, being the title, and the alt tag displaying the longtitle. the img src is displaying nothing so I’m getting a missing image icon - source code reveals src value as empty, " ". [*itemThumbnail*] displays the image fine when I put it on a normal page however. when i paste in other custom tv ditto placeholders, they are displaying nothing also. I’ve checked syntax and it appears to be fine.
Just updated to Ditto/Reflect 2.1.1 and nothing...
Mostly harmless.
Could the TV’s template and/or permission assignment have something to do with it?
The parent page has its own (mostly empty) template which contains the snippet:
[[Ditto? &parent=`[*id*]` &depth=`1` &display=`all` &showPublishedOnly=`1` &hideFolders=`1` &tpl=`itemSummary`]]
The child docs have their own template, "Item" , which holds all the tvs, including the "itemThumbnail" tv.
Not clear how the permissions would affect the parent accessing those in the children’s template to display them. Would seem unnecessary to apply all the "item" tvs to the parent’s page template, not to mention confusing for my client.
Mostly harmless.
I’ve just revisted this problem and done some more testing - i can confirm that Ditto is not pickup up my [+TVs+] whatsoever.
Any ideas out there - all I can think is reinstalling all the Modx files again - although the existing database will need to be reused.
Mostly harmless.
You miss a ---> " & " for startID!!! ....or you must remove space.
Thanks but it doesn’t make any difference with or without the space, beside you’ll notice I’ve also tried "&parent=".
Anyhow, have just reinstalled modx without any improvement...
Mostly harmless.
Try &extenders=`summary` !!
//if using multiple ditto calls on same page use &id