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.