9 years ago
7
Topic

I try to get a EXTERNAL LINK OVER AN IMAGE. So, when sb click on the Image, he goes to www.google.de.

But it doesn`t work. Please give me an idea what to do. I use Joomla! 2.5.xx

I`ve created 1 Field with IMAGE and 1 Field with the Link. But how can i bring them together ?

Link1

Link2

Link3

Link4

I use the Links because i didnt understand the MEDIA Upload here. Looks complicated...

Get a Book for SEBLOD
154 Posts
WebOne
9 years ago
0
Level 1

See:

http://www.seblod.com/community/forums/lists-search-types/image-field-linking-to-link-field

4229 Posts
Kadministrator
9 years ago
5
Level 1

Hi,

you can put HTMl typography like this on your link field:

<a href="/*link*" target="_blank">$cck->getTypo('your_image_field_name')</a>
9 years ago
4
Level 2

Thank you WebOne and Klas for your help. I try the whole night ... but I cant get it work. Maybe my skill is still to low. Try 4 days for one simple external link ...

154 Posts
WebOne
9 years ago
3
Level 3

@Einsatz:

This is working for me:

Form -> Article type

Create your link field (hide text)

Create your image field

Create List type with eg: blog template

Now in item:

Add fields :

Link field (set typography to CLEAR)

Image field (set typography to HTML)

Click + sign and add the following :

<a href="/$cck->getLink('name_of_image_link_field')"><img src="/$cck->getValue('name_of_image_field')"></a>

Note - when adding the code in the reply it seems to add a / after each " - remove the / and it works.

4229 Posts
Kadministrator
9 years ago
2
Level 4

Hi,

yes, take note about added /, never seen this before, so remove it also when trying to use my code. In my code you ofc need to replace image field name with the name of your field. But also code that WebOne posted should work

9 years ago
1
Level 5

Yes, now its work !!! So nice of you ! I try the code from WebOne. And thats the way. I deleted only the "/" like Klas say. So the HTML code looks like this:

<a href="/$cck->getLink('Link_Field_Name')"><img src="/$cck->getValue('Image_Field_Name')"></a>

The FIELD with the LINK I push in the HIDDEN DIV like here:
Hidden DIV
Oh men. So happy that you fix that problem for me.
Thank you so much !! 

Greetings from hamburg, germany,
Frank

9 years ago
0
Level 6

double post... sry

Get a Book for SEBLOD