Display a related image

Display a related image

Monday 10 July 2006 10:14:43 am - 5 replies

Modified on Monday 10 July 2006 10:15:19 am by Rémy-Christophe Schermesser

Author Message

Ł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.

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.