Forums / General / How to filter related objects

How to filter related objects

Author Message

Jack Rackham

Sunday 30 May 2004 5:40:53 am

I want to filter my related objects so that my page only shows class id, 1, 2 and 10. How do I do this?

{let related_objects=$node.object.related_contentobject_array}

{section show=$related_objects}
<div class="relatedarticles">
<h2>{"Relaterte artikler"|i18n("design/news/layout")}</h2>
<ul>
{section name=ContentObject loop=$related_objects show=$related_objects}
<li><a href={$ContentObject:item.main_node.url_alias|ezurl}>{$ContentObject:item.name}</a></li>
{/section}
</ul>
</div>
{/section}
{/let}