Content images as CSS background 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
Copy this code and paste it in your HTML
{foreach $images as $image}
<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;">{$image.name|wash}
</div> {/foreach}
Report this snippet
Comments
Subscribe to comments