Forums / General / How to filter related objects

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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}