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.

eZ debug

Timing: Jan 31 2025 03:21:36
Script start
Timing: Jan 31 2025 03:21:36
Module start 'layout'
Timing: Jan 31 2025 03:21:36
Module start 'content'
Timing: Jan 31 2025 03:21:36
Module end 'content'
Timing: Jan 31 2025 03:21:36
Script end

Main resources:

Total runtime0.0245 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.2891151.2109
Module start 'layout' 0.00540.0048 740.5000220.6875
Module start 'content' 0.01010.0127 961.1875997.9297
Module end 'content' 0.02290.0016 1,959.117229.9922
Script end 0.0245  1,989.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002911.6745140.0002
Check MTime0.00114.4307140.0001
Mysql Total
Database connection0.00072.715910.0007
Mysqli_queries0.003112.685430.0010
Looping result0.00000.065110.0000
Template Total0.00114.710.0011
Template load0.00093.543210.0009
Template processing0.00031.092610.0003
Override
Cache load0.00062.532210.0006
General
dbfile0.00031.242380.0000
String conversion0.00000.025340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs