Forums / Setup & design / image width in foreach

image width in foreach

Author Message

paul bolger

Tuesday 27 February 2007 11:21:09 pm

Does anyone know how to call the width of an image in a foreach loop?

<div class="picleft" style="width:<SOMETHING GOES HERE!>px>
{attribute_view_gui attribute=$related.data_map.picture image_class=portrait}</div>

regards
paul bolger

Paul Bolger

Ɓukasz Serwatka

Tuesday 27 February 2007 11:42:38 pm

Hi,

Use:

{$related.data_map.picture.content[portrait].width}

where "portrait" key equals to alias defined in image.ini.append.php. You can use other aliases.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

paul bolger

Wednesday 28 February 2007 2:50:33 pm

Thanks Lukasz, that works.

Paul Bolger