Forums / Setup & design / Display a related image

Display a related image

Author Message

Rémy-Christophe Schermesser

Monday 10 July 2006 10:14:43 am

Hi,

I have tried to display a simple image for all day.

I have a class with contains related images (like ine the article class).

All I want is to display my image (visuel2.jpg)

So i wrote that (I've found this multiple time on the forum) :

{attribute_view_gui attribute=$node.children[1].object.data_map.image image_class=original}

But I get that :

<a href="/index.php/media/images/site/folder/visuel2">visuel2</a>

I've tried this

{$node.children[1].object.data_map.image.view_template}

to have the name of the template to override, so I've tired to override it but I could not.

So can you help display my simple image ? What do I need to do ?

Thank you very much for your help.

Rcs

Łukasz Serwatka

Monday 10 July 2006 11:06:16 pm

Hello Rémy-Christophe,

Use code:

{attribute_view_gui image_class=original attribute=$node.children[1].data_map.image.content.data_map.image}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Rémy-Christophe Schermesser

Tuesday 11 July 2006 1:02:04 am

Hi,

I have already tried that and it does not work at all.

Łukasz Serwatka

Tuesday 11 July 2006 1:13:50 am

{attribute_view_gui image_class=original attribute=$node.children[1].data_map.image.content.data_map.image}

Works fine here. Do you have any errors/warnings in debug output? Did you clear the cache after template changes? And make sure that $node.children[1] is correct.

{$node.children[1]|attribute(show,1)}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Rémy-Christophe Schermesser

Tuesday 11 July 2006 1:26:30 am

I clear the cache everytime :)

{$node.children[1]|attribute(show,1)} display the attributes of the correct object that contains my image.

The only errors I have in the debug output is that :

Error: eZTemplate  	Jul 11 2006 10:21:30

Unknown template variable 'node' in namespace ''

Error: eZTemplate 	Jul 11 2006 10:21:30

Unknown template variable 'node' in namespace ''

Error: eZTemplate 	Jul 11 2006 10:21:30

Unknown template variable 'node' in namespace ''

Error: eZTemplate 	Jul 11 2006 10:21:30

Unknown template variable 'node' in namespace ''

Error: eZTemplate 	Jul 11 2006 10:21:30

Unknown template variable 'node' in namespace ''

Error: eZTemplate 	Jul 11 2006 10:21:30

Unknown template variable 'node' in namespace ''

Error: eZTemplate 	Jul 11 2006 10:21:30

Unknown template variable 'node' in namespace ''

Error: eZTemplate 	Jul 11 2006 10:21:30

Unknown template variable 'node' in namespace ''

I do no understand where to look to correct these errors

Christian Johansen

Wednesday 12 July 2006 3:57:29 am

You are using the $node object in a template that does not override a template in the node/ hierarchy, most likely your pagelayout.

eZ debug

Timing: Jan 18 2025 19:04:12
Script start
Timing: Jan 18 2025 19:04:12
Module start 'content'
Timing: Jan 18 2025 19:04:13
Module end 'content'
Timing: Jan 18 2025 19:04:14
Script end

Main resources:

Total runtime1.2082 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0118 588.8359180.8438
Module start 'content' 0.01180.9957 769.6797612.2656
Module end 'content' 1.00750.2006 1,381.9453337.0703
Script end 1.2081  1,719.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00470.3885210.0002
Check MTime0.00150.1234210.0001
Mysql Total
Database connection0.00070.055610.0007
Mysqli_queries1.114892.27462050.0054
Looping result0.00380.31092030.0000
Template Total1.167396.620.5836
Template load0.00240.201120.0012
Template processing1.164896.414220.5824
Template load and register function0.00030.021110.0003
states
state_id_array0.00090.071610.0009
state_identifier_array0.00110.088720.0005
Override
Cache load0.00200.1682380.0001
Sytem overhead
Fetch class attribute can translate value0.00180.148640.0004
Fetch class attribute name0.00190.154370.0003
XML
Image XML parsing0.00140.118440.0004
class_abstraction
Instantiating content class attribute0.00000.001280.0000
General
dbfile0.00870.7206290.0003
String conversion0.00000.001130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs