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 15 2025 11:40:25
Script start
Timing: Jan 15 2025 11:40:25
Module start 'layout'
Timing: Jan 15 2025 11:40:25
Module start 'content'
Timing: Jan 15 2025 11:40:26
Module end 'content'
Timing: Jan 15 2025 11:40:26
Script end

Main resources:

Total runtime1.0751 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.0047 598.1563151.1875
Module start 'layout' 0.00470.0027 749.343836.6172
Module start 'content' 0.00741.0665 785.9609977.7422
Module end 'content' 1.07390.0012 1,763.703111.7813
Script end 1.0751  1,775.4844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2960160.0002
Check MTime0.00130.1244160.0001
Mysql Total
Database connection0.00050.050610.0005
Mysqli_queries1.016694.5577620.0164
Looping result0.00070.0606600.0000
Template Total1.045197.220.5225
Template load0.00230.211820.0011
Template processing1.042896.990120.5214
Template load and register function0.00140.126110.0014
states
state_id_array0.00070.069210.0007
state_identifier_array0.00110.104120.0006
Override
Cache load0.00200.1814250.0001
Sytem overhead
Fetch class attribute can translate value0.00050.047430.0002
Fetch class attribute name0.00200.184460.0003
XML
Image XML parsing0.00320.299130.0011
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.00280.2617230.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/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