Forums / Setup & design / image width in foreach

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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