Images - how to access?

Author Message

b j

Saturday 21 January 2006 10:55:33 am

I have the following problem

I'm trying to access the image, that is a part of the article:

{def $my_node=fetch( 'content', 'node', hash( 'node_id', 82 ) )}
<img src={$my_node.data_map.image.content[reference].full_path}>

82 is number of node for my article

but it doesn't work - I am unable to read "full_path" because its always NULL

with other fields (image.content.name; image.content.id and so) I aquire the proper values...

what is wrong with that?

Maurizio Betti

Sunday 22 January 2006 3:49:05 am

Try this one:

<img src={$my_node.object.data_map.image.content[reference].full_path}>

(add '.object' between mynode and data)

Maurizio Betti
http://www.arsweb.it
http://www.hospes.it

Christopher Grondahl

Monday 23 January 2006 4:44:04 am

The debug string

|attribute(show)

is of great help to get hold of stuff sitting on a node.

Try for instance:

{$my_node|attribute(show)}

and nest from there.

Chris

ez site: http://www.acem.no

Every day is Groundhog Day

b j

Tuesday 24 January 2006 4:24:07 am

now it works but I wonder why it doesn't work with:
<img src={$my_node.data_map.image.content[reference].full_path}>

anyway I have other problem (new topic)

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:42:04
Script start
Timing: Jan 18 2025 11:42:04
Module start 'layout'
Timing: Jan 18 2025 11:42:04
Module start 'content'
Timing: Jan 18 2025 11:42:05
Module end 'content'
Timing: Jan 18 2025 11:42:05
Script end

Main resources:

Total runtime0.9451 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.0103 587.9141152.6250
Module start 'layout' 0.01030.0043 740.539139.4453
Module start 'content' 0.01470.9289 779.9844583.0625
Module end 'content' 0.94360.0015 1,363.046912.1719
Script end 0.9451  1,375.2188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3751160.0002
Check MTime0.00140.1497160.0001
Mysql Total
Database connection0.00150.163810.0015
Mysqli_queries0.865491.5665620.0140
Looping result0.00080.0828600.0000
Template Total0.904795.720.4524
Template load0.00590.625420.0030
Template processing0.898895.094320.4494
Template load and register function0.00100.102810.0010
states
state_id_array0.00100.107310.0010
state_identifier_array0.00290.302220.0014
Override
Cache load0.00500.5288280.0002
Sytem overhead
Fetch class attribute can translate value0.00070.076230.0002
Fetch class attribute name0.00130.140960.0002
XML
Image XML parsing0.00540.571630.0018
class_abstraction
Instantiating content class attribute0.00000.001460.0000
General
dbfile0.00490.5231220.0002
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
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs