Templates and images...

Author Message

Jerry Jalava

Monday 16 June 2003 3:23:30 am

Hi,
I would like to know how can I get only image variables (ie. Path) to templates? If I use attribute_view_gui it creates the hole image inserting line (<img src=...).

Regards,
Jerry

Karsten Jennissen

Monday 16 June 2003 4:54:10 am

Try the ezimage operator {"/subpathcurrentdesign/image.ext"|ezimage}

See
http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/terminology_basics/template_language

Karsten

Jerry Jalava

Monday 16 June 2003 6:27:58 am

Thanks for your reply, but...

That doesn't help me in this case. I should have been more specific... :)
This picture witch attributes I need is added in the same article class at the sametime it is published. So, I cannot specify the image with ezimage...

The name of my image attribute in article class is "Kirjoittaja_kuva" and identifier "kirjoittaja_kuva", so I need to know how to implement this picture with specific size to the template. Best would be fetching only the image path and using that inside hardcoded image tag in template...

Thanks,
Jerry

Helena Vauchez

Friday 20 June 2003 3:32:15 am

Hi Jerry
you can specify attributes for the img-tag like this:
{attribute_view_gui attribute=$content_version.data_map.<your_img_identifier> border_size=0 name="foo"}
look in design/standard/templates/content/datatype/view/ezimage.tpl to see the names of the possible attributes.
"name" for example is not there - so I wrote my own ezimage.tpl.

hope that helps
Helena

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 18 2025 05:09:53
Script start
Timing: Jan 18 2025 05:09:53
Module start 'layout'
Timing: Jan 18 2025 05:09:53
Module start 'content'
Timing: Jan 18 2025 05:09:55
Module end 'content'
Timing: Jan 18 2025 05:09:55
Script end

Main resources:

Total runtime1.6207 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.9219152.6094
Module start 'layout' 0.00530.0045 741.531339.4297
Module start 'content' 0.00991.6092 780.9609516.1797
Module end 'content' 1.61910.0015 1,297.140612.1875
Script end 1.6206  1,309.3281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.1972160.0002
Check MTime0.00140.0839160.0001
Mysql Total
Database connection0.00080.049410.0008
Mysqli_queries1.572797.0369620.0254
Looping result0.00070.0439600.0000
Template Total1.576497.320.7882
Template load0.00220.133720.0011
Template processing1.574297.134420.7871
Template load and register function0.00020.014010.0002
states
state_id_array0.00160.095710.0016
state_identifier_array0.00310.188220.0015
Override
Cache load0.00180.1094270.0001
Sytem overhead
Fetch class attribute can translate value0.00090.055730.0003
Fetch class attribute name0.00150.093940.0004
XML
Image XML parsing0.00030.021230.0001
class_abstraction
Instantiating content class attribute0.00000.000940.0000
General
dbfile0.00100.0598100.0001
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs