How to get the URL of one thumbnail in a new template

More
9 years 8 months ago - 9 years 8 months ago #53107 by grabit
Hi,

I am building a new template and I need to put one image from a field as background of a div.

I know how to get an image somewhere in a template but I need only the url of the large thumbnail.

My final code should look like this
Code:
<div class="tm-blog-image-single-view" style="background: url('/images/stories/flexicontent/l_blog_themes.jpg');"></div>

I was trying that
Code:
<div class="tm-blog-image-single-view" style="background: url('/<?php echo $this->fields['image']->display; ?>');"></div>

But I get then the full content of the image field:
Code:
<div class="tm-blog-image-single-view" style="background: url('/<a style="" href="/images/stories/flexicontent/l_blog_themes.jpg" class="fc_image_thumb fancybox" data-fancybox-group="fcview_item_fcitem_8" title=""> <img src="/images/stories/flexicontent/l_blog_themes.jpg" alt="Joomla Templates" class="fc_field_image"/> ');"></div>

Any suggestions?

An Apple a days keeps the doctor away
Last edit: 9 years 8 months ago by grabit.

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

More
9 years 8 months ago #53108 by grabit
Found.

Sorry was to fast to post.

Here is the answer:

to have the large thumbnail:
Code:
<?php echo $this->item->fields['image']->display_large_src; ?>

So simple :roll:

An Apple a days keeps the doctor away

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

More
9 years 8 months ago #53111 by micker
thanks for return !

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.356 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline