add a url link to an image in a view
Forums:
in a customer list view that's built from a customter content type with the following fields:
field_logo
field_webaddress
field_streetaddress
field_city
field_country
field_coordinates
I was able to make the Field:Content: Website open a new window using this Rewrite Results code: <a href="[field_webaddress-value]" target= "_blank">[field_webaddress-value]</a>
I was able to make the Field: Content:Map Coordinates open a new window using this Rewrite Results code:<a href="[field_coordinates-value]" target= "_blank"> Click here for map</a>
Now I want to attach a url(field_webaddress) to the logo (field_logo)using the Rewrite Results code.
Shouldn't this code work?
<a href="[field_webaddress-value]" target= "_blank">[field_logo]</a>
kzumwalt
Tue, 07/19/2011 - 00:06
Permalink
Re: add a url link to an image in a view
I got it figured out with the help of a friend.
You have to have the website address field above the logo field so I had to add a second website address field so it would be before the logo field, make it hidden, then add [field_webaddress_1] to the "Output this field as a link section"
I was trying to do both at once by adding <a href="[field_webaddress]" target= "_blank">[field_logo]</a> to the "Output this field as a link section" instead of "Rewrite the output of this field"
and I didn't have the Content: Website above the logo field I was attempting to attach it to, which is little known requirement.
Ryan G (not verified)
Thu, 08/18/2011 - 23:05
Permalink
Re: add a url link to an image in a view
Thanks so much for posting this, I'm a newb and this helped tremendously.
Kirk (not verified)
Thu, 08/18/2011 - 23:17
Permalink
Re: add a url link to an image in a view
yeah, that one was pretty tricky, I kept telling the guy that helped me: "It shouldn't be this difficult!"
Glad it helped you!
Mike (not verified)
Mon, 01/02/2012 - 13:03
Permalink
Re: add a url link to an image in a view
Hi,
I tried to do that as you said, but this is not working for me.
I get output like: title of the web address "> image_field and that would be all :/
any ideas?
Add new comment