Forums / Developer / Checking if value is selected for an object relations attribute

"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".

Checking if value is selected for an object relations attribute

Author Message

Kedar Deshpande

Thursday 11 February 2010 2:17:54 pm

For a object relations attribute I tried:

{if $node.data_map.selections.content.has_content}
true
{else}
false
{/if}

...but this doesnt seem to be returning the correct value. Is there a better way of checking to see if anything was selected for the object relations attribute?

thanks.

Kedar Deshpande

Thursday 11 February 2010 2:47:11 pm

Apologies, its working now. The test should be

$node.data_map.selections.has_content

not

$node.data_map.selections.content.has_content

thanks.