how to display a picture?

Author Message

Ous KANT

Thursday 01 June 2006 8:36:46 am

Hello
i have a folder object and as related_object i've an "image" Object.

i want to display this "image" (related Object) when accessing the folder.

in the override template, I've this code:

{let myrelate_objects=fetch( 'content', 'related_objects',
        hash( 'object_id', $node.contentobject_id))}
        
        {foreach $myrelate_objects as $myrelate_object}
          {if eq($myrelate_object.class_name, "Image")}
            <br />{$myrelate_object.name}<br />{*<b>i want to display hier</b>*}
          {/if}
        {/foreach}
{/let}

the variable <b>$myrelate_object.name</b> return the "my_image" as the name of "my_image.png".
so i can't display the picture.
can someone help me??

Marcin Drozd

Thursday 01 June 2006 9:47:21 am

Hi

try with

{let myrelate_objects=fetch( 'content', 'related_objects',
       hash( 'object_id', $node.contentobject_id))}
       {foreach $myrelate_objects as $myrelate_object}
         {if eq($myrelate_object.class_name, "Image")}
           <br />{$myrelate_object.name}<br />
{*<b>i want to display hier</b>*}
{attribute_view_gui attribute=$myrelate_object.data_map.image}
         {/if}
       {/foreach}
{/let}

http://ez-publish.pl

David Jones

Thursday 31 August 2006 4:19:21 am

This works,

But I just want the path to the image, not the whole image tag.

Is this possibly?

Thanks

Marcin Drozd

Thursday 31 August 2006 5:21:55 am

Hi David
I think, it is, but Im not sure what U want to get. so try with:
{$myrelate_object.data_map.image.content.original.full_path}
is it what U want?

http://ez-publish.pl

David Jones

Thursday 31 August 2006 6:07:09 am

Grat thanks.

This is what i needed

$related_object.data_map.image.content.original.full_path|ezroot

Thanks again

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