I want to display an icon next to the heading of a ditto generated list, dependent on a TV set "type". The string I want the TV to output isn’t being displayed in the list returned by ditto.
I created a TV I’ve called ArticleType. It is of the type DropDown List Menu and the current Input Option Values are "doc||offsite-link". The TV is called from the ditto template chunk (please forgive the messy code, still developing the site):
<div id="articlelink" style="border:solid 1px #306018; border-width:0 0 1px 0; margin:15px 0 0 0; padding:0;">
<div style="width:40px; float:left; margin:0; padding:0; text-align:right; color:#114160; font-size:12px; font-family:verdana,arial,sans serif; font-weight:bold; text-transform:uppercase;">[+createdon:date=`%b`+]<br /><span style="font-size:22px;">[+createdon:date=`%d`+]</span></div>
<div style="margin:0 0 0 45px; padding:0 15px 0 15px; border:solid 1px #306018; border-width:0 0 0 1px;">
<img src="images/articleimages/[+alias+].jpg" alt=" " style="margin:0 0 8px 15px; float:right;" />
<img src="images/[*ArticleType*].gif" alt=" " border="0" align="absmiddle" />
<h2><a href="[~[+id+]~]">[+title+]</a></h2>
<p style="margin:0; padding:10px 0 10px 0;">[+introtext+] <a href="[~[+id+]~]">Read more...</a></p>
<div style="clear:both;"></div>
</div>
</div>
This template is used on the front page where it formats this ditto call:
[!Ditto? &parents=`41` &display=`3` &depth=`3` &sortBy=`createdon` &sortDir=`DESC` &tpl=`DittoTemplate` !]
The resulting code output by ditto doesn’t contain the [*ArticleType*] string at all. The offending line is output as:
<img src="images/.gif" alt=" " border="0" align="absmiddle" />
You can see the page for yourself (its state at the time of posting reflected this issue) at:
http://www.vicphysics.org/index.php
Incidentally there are currently other issues on that page that I’m working on, that I do not believe affect this issue.
Some possibly useful diagnostic info:
phpinfo:
http://www.vicphysics.org/phpinfo.php
MODx version: 0.9.6
Ditto version: 2.0.2
My browser: Firefox 2.0.0.11
Also happens on: MSIE 7.0.5730.11
My OS: Microsoft Windows XP v2002 SP2
Thanks in advance for any help you can offer!