News:

Looking for documentation? Take a look on our wiki

Main Menu

Getting Link of an image

Started by Ducksoul, December 29, 2011, 20:05:41 PM

Previous topic - Next topic

Ducksoul

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?

PRO

Maybe

<?php echo $this->category>images[0]->file_url_thumb; ?>

PRO

actually, no that doesnt work. I tried a few ways.

I do remember seeing some problem about the category image

Ducksoul

#3
The code you posted works just fine. :) Thanks.

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