I’m playing around with revolution (2.0.0 beta5) and ran into what I hope is a simple problem.
On my evolution site I have a Ditto call whos tpl chuck includes the following line to display an image.
<a href="[(base_url)][~[+id+]~]" ><img src="[+screenshot+]" alt="[+pagetitle+]" title="[+pagetitle+]" width="100" />
So I converted it to this for the revolution site...
<a href="[[++base_url]][[~[[+id]]]]" ><img src="[[+screenshot]]" alt="[[+pagetitle]]" title="[[+pagetitle]]" width="100" />
All the placeholder values come back with the correct information except for the TV - [[+screenshot]]. It just seems to be empty.
If I put [[*screenshot]] directly in the page that Ditto is reffering to, it give me the right value. So I know the value is there.
I’ve read several pages that are similar to what I’m doing, but I don’t see what is wrong. Any suggestion?
Thanks,
Randy
-
MODX Staff
- 10,725 Posts
Might be a bug in the Revo version of Ditto; I don’t know to be honest because I use getResources instead.
Anyone else not able to render placeholders representing TV’s in Ditto templates, or know what the problem might be?
I just converted a getResources tag to Ditto and it displayed both the TVs.
Can you give some more details about the TV (type, default value, Input Option values, any bindings, etc.) so I can test your specific situation?
If you’ve made changes to the TV, you may to clear the cache and save pages that contain that TV.
BTW, I did test TV-based chunks with an Image TV in Ditto and it worked fine.
The TV...
Variable Name: screenshot
Input Type: Image
Input Option Values: Empty
Default Value: /images/
Output Type: default
Template Access is set to the right template
The target document TV setting...
[[*screenshot]]: /images/test01.jpg
The test page has this Ditto call...
[[!Ditto? &parents=`2` &depth=`2` &display=`5` &orderBy=`pagetitle ASC` &tpl=`list-box`]]
The list-box chuck has the line in question...
<a href="[[++base_url]][[~[[+id]]]]" ><img src="[[+screenshot]]" alt="[[+pagetitle]]" title="[[+pagetitle]]" width="100" />
The output on the test page shows the two pagetitle tags work, but screenshot tag is empty...
<img width="100" title="TestTitle" alt="TestTitle" src="">
Cleared Cache and re-saved pages, but still no luck.
I was looking at getResources to see if it was a better way to do this, but couldn’t find anything on it’s usage. Is there a link for more information on it?
I think I covered everything... Thanks!