you just need to create an image-TV for your resources template and add the image-tv-placeholder to your getResurces-tpl.
Don't forget to add the &includeTVs=`1` property to your getResources-tag.
For more Info about getResources-properties see:
http://rtfm.modx.com/display/ADDON/getResources
How does it know which image goes with which list element??
I read the TV display info in the above readme.
Thank you, Tom
lets say you have an image-TV in your Resources, which you're listing with getResources, named myImageTV
place this into your getResources-tpl:
I understand placing the image tpl/TV -- what I don't understand is how to link a specific image with a specific resource menu item.
Please look at the URL provided -- each product has a distinct image associated with it.
Thank you, tom
[ed. note: TomMLS last edited this post 14 years, 6 months ago.]
-
☆ A M B ☆
- 894 Posts
use something like this in your gR Tpl
<li>
<a href="[[+id]]"><img src="[[+tv.myImageTV]]" alt="[[+pagetitle]]"/></a>
<a href="[[+id]]" >[[+pagetitle]]</a>
</li>
If your using HTML5 you can just use one a href to encapsulate both the text and the image.
Hope that helps.
If not using html5 why must one have two a href links??
What's not clear to me is how to link specific images with specific menu items.
Thank you, Tom
discuss.answer
What's not clear to me is how to link specific images with specific menu items.
each menu-item is a Resource, right?
On each of this Resources you can choose an image with this image-TV.
From then on the image is linked to the resource(menu-item) with its TV.
If you want something else, you have to be more clear with your questions.
Ohhhhhhhh...the image TV is used by the resources themselves.
That is clearer, I need an image TV with both image and text for the alt/title tag.
Now I understand what to do.
Thank you, Tom