Show image object in template

Author Message

Lars Arne Brekken

Wednesday 09 July 2003 6:37:00 am

I have a class that has two attributes; a TextField and an Image.

In the template for this class, I want to show the small version of this image.

I guess it's simple, but I really can't figure it out...

Lars

Paul Borgermans

Wednesday 09 July 2003 7:04:10 am

You can pass this as a variable to attribute_view_gui

{attribute_view_gui attribute=$myAttribute image_class=small}

Here is the complete list of variables that are in the standard distribution with their defaults.

image_class=large
alignment=false()
hspace=false()
border_size=0}

Also, check the directory design/standard/templates/content/dadatype/view for parameters of the other datatypes.

You can also add variables of your own of course, but don't do that in the standard design directory

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

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 11:41:20
Script start
Timing: Jan 18 2025 11:41:20
Module start 'layout'
Timing: Jan 18 2025 11:41:20
Module start 'content'
Timing: Jan 18 2025 11:41:21
Module end 'content'
Timing: Jan 18 2025 11:41:21
Script end

Main resources:

Total runtime1.5282 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0087 589.0391152.6250
Module start 'layout' 0.00870.0039 741.664139.4453
Module start 'content' 0.01271.5141 781.1094522.7656
Module end 'content' 1.52670.0014 1,303.87508.3203
Script end 1.5282  1,312.1953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.2406160.0002
Check MTime0.00170.1100160.0001
Mysql Total
Database connection0.00210.134210.0021
Mysqli_queries1.471896.3065540.0273
Looping result0.00060.0403520.0000
Template Total1.485097.220.7425
Template load0.00250.166420.0013
Template processing1.482597.007320.7412
Template load and register function0.00020.015310.0002
states
state_id_array0.00090.060210.0009
state_identifier_array0.00090.059420.0005
Override
Cache load0.00220.1440190.0001
Sytem overhead
Fetch class attribute can translate value0.00070.048620.0004
Fetch class attribute name0.00220.141030.0007
XML
Image XML parsing0.00060.041620.0003
class_abstraction
Instantiating content class attribute0.00000.000630.0000
General
dbfile0.00080.0539170.0000
String conversion0.00000.000640.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0003 secs