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.

eZ debug

Timing: Jan 31 2025 04:29:31
Script start
Timing: Jan 31 2025 04:29:31
Module start 'layout'
Timing: Jan 31 2025 04:29:31
Module start 'content'
Timing: Jan 31 2025 04:29:31
Module end 'content'
Timing: Jan 31 2025 04:29:31
Script end

Main resources:

Total runtime0.0154 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.1328151.2109
Module start 'layout' 0.00470.0027 739.343836.6484
Module start 'content' 0.00730.0065 775.992294.1563
Module end 'content' 0.01380.0015 870.148433.9922
Script end 0.0154  904.1406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002314.7577140.0002
Check MTime0.00106.6090140.0001
Mysql Total
Database connection0.00074.707410.0007
Mysqli_queries0.002717.538830.0009
Looping result0.00000.077310.0000
Template Total0.00117.010.0011
Template load0.00085.298010.0008
Template processing0.00031.646410.0003
Override
Cache load0.00063.690210.0006
General
dbfile0.001610.600680.0002
String conversion0.00000.044840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs