Forums / Setup & design / 3.9 attribute_view_gui doesn't show an article related image

3.9 attribute_view_gui doesn't show an article related image

Author Message

Danny Goldenthal

Tuesday 19 June 2007 7:25:46 am

I'm using a fresh installation of eZpublish 3.9.2. Following the TSCM tutorial (http://ez.no/ezpublish/documentation/building_an_ez_publish_site/the_welcome_page/creating_and_using_a_custom_template)
an override template is used to display an article in the default node.
The article related image is displayed using:

<div class="imageright">

   {attribute_view_gui attribute=$node.object.data_map.image}

</div>

But it doesn't show it.
After some trial and error, I've managed to display the image using:

<div class="imageright">

   {content_view_gui view=embed content_object=$node.object.data_map.image.content}

</div>

Is this the right way to do this?

Tobias Struckmeier

Tuesday 19 June 2007 9:05:42 am

Hi,

do you use the ezwebin or plain site interface?

Cheers,
Tobias

Danny Goldenthal

Tuesday 19 June 2007 10:48:29 pm

As per the tutorials instructions, I've installed eZpublish with the plain_site.

Thanks for helping,
Danny.

paul bolger

Tuesday 19 June 2007 11:16:32 pm

Hi Danny

If you want to examine the content of a variable try using the attribute pipe:

{$node.object.data_map.image|attribute ( show ) } 

There are a few variations, but the general idea is that it'll show you what strings, values or arrays are available for the current object.

Another approach for displaying images is to drill down until you find the full_path string ($node.object.data_map.image.content.data_map.image.content.small.full_path is one of the paths I ended up with) and put that in the img tag. This means you can add CSS classes etc at the template level.

Paul Bolger