Skip to the content
Documentation

Relations

No ratings yet

You could find these informations elsewhere, but here are some useful things :
- output data only if attribute has some content :

{if $node.data_map.my_attribute.has_content}
    {* do whatever must be done *}
{/if}

- if my_attribute is an object relation :

{def $my_relation_object=$node.data_map.my_attribute.content.main_node}
{* display $my_relation_object *}

- if my_attribute is an object relation list :

{def $my_relation_list_object=$node.data_map.my_attribute.content.relation_list}
{foreach $my_relation_list_object as $current_object}
    {* display $current_node *}
{/foreach}