List related objects?

Author Message

Clemens T

Saturday 01 October 2005 6:21:52 am

Heya all,
There is a fetch for reverse_related_objects, but how about just related objects?
How can I display them in my templates?
Thanks,
Clemens

Clemens T

Saturday 01 October 2005 6:25:33 am

Never mind, got it (from the admin tpl)

...
{section show=$node.object.related_contentobject_count}
    {section var=RelatedObjects loop=$node.object.related_contentobject_array sequence=array( bglight, bgdark )}
        <tr class="{$RelatedObjects.sequence}">

        {* Name. *}
        <td>{$RelatedObjects.item.content_class.identifier|class_icon( small, $RelatedObjects.item.content_class.name|wash )}&nbsp;{content_view_gui view=text_linked content_object=$RelatedObjects.item}</td>

        {* Type. *}
        {section show=$node.object.related_contentobject_count}
        <td>{$RelatedObjects.content_class.name|wash}</td>
        {/section}

        </tr>
{/section}
...

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 19 2025 09:05:49
Script start
Timing: Jan 19 2025 09:05:49
Module start 'layout'
Timing: Jan 19 2025 09:05:49
Module start 'content'
Timing: Jan 19 2025 09:05:50
Module end 'content'
Timing: Jan 19 2025 09:05:50
Script end

Main resources:

Total runtime1.2849 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 590.1875152.6094
Module start 'layout' 0.00770.0045 742.796939.4141
Module start 'content' 0.01211.2716 782.2109424.6406
Module end 'content' 1.28370.0011 1,206.85168.1875
Script end 1.2849  1,215.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2633160.0002
Check MTime0.00140.1072160.0001
Mysql Total
Database connection0.00130.097410.0013
Mysqli_queries1.243696.7903520.0239
Looping result0.00040.0338500.0000
Template Total1.248897.220.6244
Template load0.00230.181620.0012
Template processing1.246497.007420.6232
Template load and register function0.00030.021910.0003
states
state_id_array0.00170.132210.0017
state_identifier_array0.00070.054120.0003
Override
Cache load0.00190.1498110.0002
Sytem overhead
Fetch class attribute can translate value0.00060.049610.0006
Fetch class attribute name0.00080.062420.0004
XML
Image XML parsing0.00010.009410.0001
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00170.1329100.0002
String conversion0.00000.000840.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/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: 8
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs