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: [email protected]

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