Cannot display path of image

Author Message

willy jansen

Tuesday 07 September 2004 4:16:57 am

I'd like to display the path of the image of ana article. I want to create a list of articles on my homepage using onoly the article's title and the image.
I want to put the path in a IMG tag.

I'm on epubl 3.4 but the {$Child:item.object.data_map.image.content.medium.url} as suggested here http://ez.no/ez_publish/download/changelogs/ez_publish_3_3/new_image_system returns nothing.

I use the code below. (I'm not a programmer, I just copy-and-modify examples from the ez.no web)

{let children=fetch( content, list, hash( parent_node_id, $node.node_id,
                                     sort_by, $node.sort_array,
                                     limit, 7,
                                     class_filter_type, include,
                                     class_filter_array, array( 'article' ) ) )}
 {section name=Child loop=$children}
  <a href={$Child:item.url_alias|ezurl}>
   <img src="{$Child:item.object.data_map.image.content.medium.url}">
  </a>
  <br>
  {$Child:item.object.data_map.title.content|wash}
 {/section}
{/let}

Anybody a clue what is going wrong?

willy jansen

Thursday 09 September 2004 1:25:30 am

bumped it up.

I'd like to know how to fetch the image (or the images url) without using attribute_view_gui

Ole Morten Halvorsen

Thursday 09 September 2004 6:37:06 am

Hi,

To get the full url use:

{$Child:item.object.data_map.image.content.medium.url|ezroot}

For more information do:

{$Child:item.object.data_map.image.content|attribute(show)}

This will print out debug information about the image attribute.

Ole M.

Senior Software Engineer - Vision with Technology

http://www.visionwt.com
http://www.omh.cc
http://www.twitter.com/omh

eZ Certified Developer
http://ez.no/certification/verify/358441
http://ez.no/certification/verify/272578

willy jansen

Thursday 09 September 2004 7:19:52 am

Thanks Ole , but {$Child:item.object.data_map.image.content.medium.url|ezroot} returns an empty string ""

What may be the trouble here?

The debug info says:
Missing argument 4 for checkaccess() in /home/httpd/vhosts/MYSTE/httpdocs/kernel/classes/ezcontentobjecttreenode.php on line 2576

willy jansen

Thursday 09 September 2004 11:36:19 am

It seems the problem has to do with my configuration.

I'm looking for someone who can help me solving this problem.

If you are interested: my email is: batigolix@yahoo.co.uk

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 19:17:28
Script start
Timing: Jan 18 2025 19:17:28
Module start 'layout'
Timing: Jan 18 2025 19:17:28
Module start 'content'
Timing: Jan 18 2025 19:17:29
Module end 'content'
Timing: Jan 18 2025 19:17:29
Script end

Main resources:

Total runtime1.0954 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0108 589.3438152.6250
Module start 'layout' 0.01080.0033 741.968839.4453
Module start 'content' 0.01411.0796 781.4141525.8906
Module end 'content' 1.09380.0016 1,307.304712.1641
Script end 1.0953  1,319.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.3382160.0002
Check MTime0.00170.1558160.0001
Mysql Total
Database connection0.00660.600210.0066
Mysqli_queries1.031394.1532630.0164
Looping result0.00080.0726610.0000
Template Total1.056696.520.5283
Template load0.00240.218420.0012
Template processing1.054296.241620.5271
Template load and register function0.00020.020010.0002
states
state_id_array0.00100.090810.0010
state_identifier_array0.00230.213120.0012
Override
Cache load0.00200.1859300.0001
Sytem overhead
Fetch class attribute can translate value0.00070.065120.0004
Fetch class attribute name0.00120.109650.0002
XML
Image XML parsing0.00030.028520.0002
class_abstraction
Instantiating content class attribute0.00000.000950.0000
General
dbfile0.00060.0583100.0001
String conversion0.00000.000940.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
10content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs