Keyword

How to retrieve image url from Image Extra Field?

More
11 years 9 months ago #107970 by Olgri
Hi

Is there a way to retrieve a url of an image from an extra field (type 'image')?

i.e. I've got an extra field for uploading a product image. To display it in the item view I've added:

<?php $this->item->extraFields->ProductImage->value; ?>

to the item.php,

where ProductImage is the field's alias. The result I get:

<img alt="Product Image" src="/images/product.png">

I would like it to be linked to a full size image (like lightbox) so I have to add <a> tags around the image with href = image src.

Is there a way to retrieve it? i.e. something like $this->item->extraFields->ProductImage->image_src ??

Thanks!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum