Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-11-27 21:46:03

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#2 2008-01-03 17:08:36

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

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

#3 2008-01-07 12:09:15

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

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

#6 2008-01-07 16:16:41

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: to associate an image to a link

You could always do this with javascript.

Offline

Board footer

Powered by FluxBB