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.

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 31 2025 03:43:25
Script start
Timing: Jan 31 2025 03:43:25
Module start 'layout'
Timing: Jan 31 2025 03:43:25
Module start 'content'
Timing: Jan 31 2025 03:43:25
Module end 'content'
Timing: Jan 31 2025 03:43:25
Script end

Main resources:

Total runtime0.0205 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0040 588.1250151.2109
Module start 'layout' 0.00400.0036 739.3359220.6875
Module start 'content' 0.00760.0112 960.02341,001.8047
Module end 'content' 0.01880.0016 1,961.828137.9922
Script end 0.0204  1,999.8203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002612.6996140.0002
Check MTime0.00115.5589140.0001
Mysql Total
Database connection0.00073.569210.0007
Mysqli_queries0.002110.130630.0007
Looping result0.00000.035010.0000
Template Total0.00115.610.0011
Template load0.00084.097210.0008
Template processing0.00031.437210.0003
Override
Cache load0.00062.889610.0006
General
dbfile0.00021.197180.0000
String conversion0.00000.024540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs