eZ Community » Forums » Developer » Extract the image of this tag style
expandshrink

Extract the image of this tag style

Extract the image of this tag style

Tuesday 21 February 2012 1:02:35 am - 5 replies

regards
As I can extract the image of this tag, to charge from a class
<div style="background-image:url(pages/01.jpg);"> </ div>

Tuesday 21 February 2012 4:47:20 pm

Hi,

more info about what you are looking to do would help.

Is that only et suggestion?

regards,

Tuesday 21 February 2012 5:05:56 pm

this is the html code complete, an application jquery:

 

 <div id="magazine">
    <div style="background-image:url(pages/01.jpg);"></div>
    <div style="background-image:url(pages/02.jpg);"></div>

    <div style="background-image:url(pages/03.jpg);"></div>
    <div style="background-image:url(pages/04.jpg);"></div>
    <div style="background-image:url(pages/05.jpg);"></div>
    <div style="background-image:url(pages/06.jpg);"></div>
</div>

I tried to load the images using this method, but not charged:

 <div style="background-image:url({$node.data_map.image.content.small.full_path|ezroot});"></div>

Tuesday 21 February 2012 5:54:07 pm

 

supposing your alias 'small' is available and image_alias successfully created ...

I think you should use

 ezroot('no')

to avoid double quotes.

as your template code will generate somthing like

 style="backgroudn-image:url("/var..../");"

because ezroot without parameters will add double quote

regards

Tuesday 21 February 2012 7:36:39 pm

Greetings again
I tried everything I've followed and does not load images

Wednesday 22 February 2012 2:30:53 am

Hi Edixon,
could you post the HTML code that you get after looking at the rendered page, it might be easier to tell what's going on.
Also as Ousmane pointed out, check the following (some of which you have already done)
- image alias exists and is used (check debug log for 'alias does not exist error')
- check the HTML source in the rendered page so you can see what the tpl code gets turned into.
- check the path to the images is correct
I'm sure we can track this down.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from