I have a listing page with links to international articles on my site via a Ditto call
[[Ditto? &parents=`109` &display=`20 &sortBy=`myDate` &dateSource=`myDate` &dateFormat=`%d-%b-%y` &tpl=`LatestNews2`]]
However I want to be able to automatically link a country flag image to each listing depending on which country it is.
The flags are in assets/images/flags
I think the next thing to do is make a new TV say for example [*newsFlags*] and add it to the LatestNews2 chunk. but what parameters do I make the TV so each listing has the appropriate flag next to it?
Any help much appeciated.
w
hi b58,
thanks for that.
I have now used the [*description*] tv and added it to the chunk as well as adding the flag gif name in the description field but for some reason it is not picking up the image. Not sure where I have gone wrong.
LatestNews2 chunk
<td width="552"> <p><img src="assets/images/flags/[*description*].gif" alt="[*description*]" /></p><p class="latestnews_date">[+date+]</p>
<p><a href="[~[+id+]~]" class="latestnews_description">[+pagetitle+]</a></p></td>
If I take out the [*description*] part of the path and replace it with the name of a flag the image appears so why is the description tv not showing the flag?
Should I have given the description tv a value of some sort?
w