Reputation: 1374
In the tx_news plugin list partial, I want to change the image it generates into a background image.
<f:image image="{mediaElement}" title="{mediaElement.originalResource.title}" alt="{mediaElement.originalResource.alternative}" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}"/>
How to I get the src
of the image so I can put it into an inline style?
Upvotes: 0
Views: 1796
Reputation: 892
You can simply use the f:uri.image Viewhelper and use the same attributes.
Your code will look like this:
{f:uri.image(image:mediaElement,title:'{mediaElement.originalResource.title}',alt:'{mediaElement.originalResource.alternative}', maxWidth:'{settings.list.media.image.maxWidth}',maxHeight:'{settings.list.media.image.maxHeight}')}
Upvotes: 1