Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
to associate an image to a link
Hi.
That is: to associate an image to a link.
The idea is to have an image (from Content -> Images) associated to a link (in Content -> Links).
That will make easier to have a list of links represented by images (for example, for brands logos).
Currently, to achieve something similar, I have each link created twice: one with a text description, and the other with some textile/xhtml/upm_image code in the description. The one with the image belongs to a “logo” category, so I can output a list of linked logos using txp:linklist
.
Thanks!
Offline
Re: to associate an image to a link
I’d like to show support for this idea…
I can imagine that many types of sites would find it useful to be able to output links as images as well as text.
Offline
Re: to associate an image to a link
it would be extremely useful. for that matter. associating an image with a file would be good too.
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
#4 2008-01-07 13:06:55
- guiguibonbon
- Member
- Registered: 2006-02-20
- Posts: 296
Re: to associate an image to a link
erm.. Instead of making two instances of the same link; you could put the id of the image in the description field; and put the text in the description of the image. Then you could have the following link-form, with the upm_image and asy_wondertag plugins :
<asy_wondertag>
<txp:upm_image image_id="<txp:link_description />">
<p><txp:link><img src="<txp:upm_img_thumb_url />" height="<txp:upm_img_thumb_height />" width="<txp:upm_img_thumb_width />"/></txp:link>
<br/><txp:link/></p>
<txp:upm_img_caption />
</txp:upm_image>
</asy_wondertag>
Offline
#5 2008-01-07 13:17:19
- guiguibonbon
- Member
- Registered: 2006-02-20
- Posts: 296
Re: to associate an image to a link
What would be cool is some sort of upm_img_popup_everywhere
plugin that would add a little icon under every non-title field, both in files and links, that opens an image browser and enables to add the image id to the field. Or a shortcut you can type when the cursor is in the field.
Edit : to be more specific, I would of course love to see an actual image field, but since I suspect how devs will respond (“not before crockery”) I’m trying to look at alternatives here.
Last edited by guiguibonbon (2008-01-07 13:40:43)
Offline
Re: to associate an image to a link
You could always do this with javascript.
Offline