Image datatype

Author Message

David Santiso

Tuesday 22 March 2011 12:52:04 pm

Hi,

I've seen that when I add an image in a class using the image data type, it saves four copies with different sizes in var/ezflow_site/storage/images/...

When I show the image in a template ...

{attribute_view_gui attribute=$node.data_map.image}

... How can I choose another one of those pictures?

Philippe VINCENT-ROYOL

Tuesday 22 March 2011 1:10:22 pm

Hi David,

Are you sure to have image attribute on your class? Maybe check {$node.data_map|attribute(show, 1)}

Else you have a relation object .. check {$node.object.related_contentobject_array|attribute(show,1)}

Thats it :)

Certified Developer (4.1): http://auth.ez.no/certification/verify/272607
Certified Developer (4.4): http://auth.ez.no/certification/verify/377321

G+ : http://plus.tl/dspe
Twitter : http://twitter.com/dspe

Damien Pobel

Tuesday 22 March 2011 1:13:37 pm

Hi David,

you can pass parameters to attribute_view_gui. In the case of image, you can write :

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

to display the medium variation. You can look at the beginning design/standard/template/content/datatype/view/ezimage.tpl template to see what parameters are available.

Cheers

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

David Santiso

Tuesday 22 March 2011 1:41:17 pm

Thank you very much ;)

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 10:21:59
Script start
Timing: Jan 18 2025 10:21:59
Module start 'layout'
Timing: Jan 18 2025 10:21:59
Module start 'content'
Timing: Jan 18 2025 10:22:00
Module end 'content'
Timing: Jan 18 2025 10:22:00
Script end

Main resources:

Total runtime0.8523 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.0063 588.9063152.6094
Module start 'layout' 0.00630.0062 741.515639.4141
Module start 'content' 0.01250.8383 780.9297593.2578
Module end 'content' 0.85070.0015 1,374.187512.2031
Script end 0.8522  1,386.3906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4122160.0002
Check MTime0.00170.1949160.0001
Mysql Total
Database connection0.00060.069710.0006
Mysqli_queries0.787092.3396620.0127
Looping result0.00070.0868600.0000
Template Total0.803294.220.4016
Template load0.00230.265320.0011
Template processing0.800993.976120.4005
Template load and register function0.00020.020510.0002
states
state_id_array0.00330.388210.0033
state_identifier_array0.00180.206020.0009
Override
Cache load0.00190.2195250.0001
Sytem overhead
Fetch class attribute can translate value0.00070.087730.0002
Fetch class attribute name0.00160.188560.0003
XML
Image XML parsing0.00150.173830.0005
class_abstraction
Instantiating content class attribute0.00000.002060.0000
General
dbfile0.00660.7746230.0003
String conversion0.00000.001440.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/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs