This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » how to display a picture?
expandshrink

how to display a picture?

how to display a picture?

Thursday 01 June 2006 5:36:46 pm - 4 replies

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??

Thursday 01 June 2006 6:47:21 pm

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}

Thursday 31 August 2006 1:19:21 pm

This works,

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

Is this possibly?

Thanks

Thursday 31 August 2006 2:21:55 pm

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?

Thursday 31 August 2006 3:07:09 pm

Grat thanks.

This is what i needed

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

Thanks again

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from