I’ve had this problem a couple of times so I thought I’d post and ask about it briefly. In a Ditto call on a set of document, theres a TV called "optImage" of type "Image", but when referenced in a template (eg, <img src="[+optImage+]" alt="" />), no value is output for it. And yes, the value is set for those documents which use a template associated with said TV, as other TV values come through fine.
Can someone give me the reason why this wouldn’t be working, I know it’s going to be a simple and stupid one. Cheers.
-
☆ A M B ☆
- 24,524 Posts
TVs are called thusly: [*optimage*]
I also got confused with that at first.
Prior to Ditto 2.0.2, it needed to be prefixed with tv, but not in the latest ditto, and yes its needed to be with [+optImage+] syntax and make sure the template you are using is linked to that TV. TV names are case-sensitive.
Is that true of document variables as well? [+longtitle+] or [*longtitle*] in Ditto 2.0.2 template?
Sorry I wasn’t super clear.
I have a Ditto template which has about 5 placeholders in it for various TVs. All but the optImage value is working so I can’t figure out why. I know how TVs relate to templates and how placeholders work in Ditto templates but this has me stumped. I’ve also done a debug run with Ditto but its a bit bung (possibly because I use Mootools in my site) so I could only download and view it. From what I could glean from the Ditto debug, no optImage was being retrieved from the DB.
If no optImage is being retrieved from the DB, then check a few things :
- does the TV have a value, and if not, does it have a default value ?
- is the TV associated with the right template ?
- did you set specific document permission for that TV (or forgotten to do so) ?
It should work...
If you’re using filters in your Ditto call, also check them, they can be confusing at times...
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id