Posted By

gerhardsletten on 10/05/10


css ezpublish

Versions (?)

Content images as CSS background in Ez publish

 / Published in: eZ Publish

If you need to display content images as background on a element. You need to set height, width and background for the element

  1. {foreach $images as $image}
  2. <div style="height:{$image.data_map.image.content['original'].height}px;width:{$image.data_map.image.content['original'].width}px;background: url(http://{ezini( 'section', 'SiteURL', 'site.ini' )}{$image.data_map.image.content['original'].url|ezroot(no)}) no-repeat;">{$|wash}</div>
  3. {/foreach}

Report this snippet  

You need to login to post a comment.