VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Ducksoul on December 29, 2011, 20:05:41 PM

Title: Getting Link of an image
Post by: Ducksoul on December 29, 2011, 20:05:41 PM
Hey there,
in my category view I want to add the category images as background-images of a div. My problem is that I can only get the image with image tags, but not the source of the image.

<div class="catimg" style='background-image: url("<?php echo $category->images[0]->displayMediaFull('class="product-image"',false?>; ?>") center center no-repeat;'>

How can I get only the url of the image without image tags?
Title: Re: Getting Link of an image
Post by: PRO on December 29, 2011, 20:33:05 PM
Maybe

<?php echo $this->category>images[0]->file_url_thumb; ?>
Title: Re: Getting Link of an image
Post by: PRO on December 29, 2011, 20:47:14 PM
actually, no that doesnt work. I tried a few ways.

I do remember seeing some problem about the category image
Title: Re: Getting Link of an image
Post by: Ducksoul on December 29, 2011, 20:49:05 PM
The code you posted works just fine. :) Thanks.

Edit: It does display the relative link. That's more than I got while trying ^^