image vertical align in templates

Author Message

Noicokuna Niemoge

Friday 17 April 2009 5:22:39 am

Hi there;

I want to align the image vertically. I creates a custom image class "imagekolekcja", the code in template looks like:

{attribute_view_gui attribute=$node.data_map.image image_class=imagekolekcja}

The output is:

<img src="/var/ezwebin_site/storage/images/kolekcja/kapielowe/zolw-taylor/641-1-pol-PL/Zolw-Taylor_imagekolekcja.jpg" width="280" height="162"  style="border: 0px;" alt="" title="" />

I want to have style="vertical-align: middle;" specifically for the image class "imagekolekcja".

I have no freaking clue how to do this. I have read that custom CSS tag wraps an image in DIV, but then vertical-align doesn't work - it has to be in image tag.

Please help.

Shiki soku ze ku...

Olivier Portier

Tuesday 28 April 2009 3:16:20 am

Hi,

You will have to edit the ezimage.tpl file that is loaded.
To know is path, display the template list in the debug and found-out the ezimage.tpl path.
This one by default :
<i>design/standard/templates/content/datatype/view/ezimage.tpl</i>

Make a override rule of it, or reproduce the path in you design and edit it to add a condition on image class "imagekolekcja".
Only for this class you will print your style or call a special CSS Class.

Hope this will help you.
Regards
Olivier

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.