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

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 20:53:42
Script start
Timing: Jan 18 2025 20:53:42
Module start 'layout'
Timing: Jan 18 2025 20:53:42
Module start 'content'
Timing: Jan 18 2025 20:53:43
Module end 'content'
Timing: Jan 18 2025 20:53:43
Script end

Main resources:

Total runtime0.7978 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.0098 588.1719152.6563
Module start 'layout' 0.00980.0053 740.828139.5078
Module start 'content' 0.01510.7812 780.3359586.4609
Module end 'content' 0.79630.0015 1,366.796912.0938
Script end 0.7978  1,378.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.4872160.0002
Check MTime0.00150.1852160.0001
Mysql Total
Database connection0.00130.157710.0013
Mysqli_queries0.722690.5799620.0117
Looping result0.00070.0836600.0000
Template Total0.737092.420.3685
Template load0.00390.492620.0020
Template processing0.733091.879320.3665
Template load and register function0.00010.013410.0001
states
state_id_array0.00200.255010.0020
state_identifier_array0.00130.166520.0007
Override
Cache load0.00320.3995280.0001
Sytem overhead
Fetch class attribute can translate value0.00040.054730.0001
Fetch class attribute name0.00120.153960.0002
XML
Image XML parsing0.00330.418830.0011
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.01221.5335220.0006
String conversion0.00000.001740.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
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs