Forums / General / Check if attribute has content or not.

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

Check if attribute has content or not.

Author Message

Nebojsa Eric

Thursday 21 September 2006 4:44:12 am

I want to check if an image attribute has content or not. Any advice?

Tnx.

Fabio Carissimi

Thursday 21 September 2006 6:09:13 am

I think you can check the value of 'has_content' for an attribute.

$node.object.data_map.my_attribute.has_content has the value 'true' or 'false'
according to the response of the question :
does my attribute named 'my_attribute' has content ?

For me, it works fine and I think it works for any kind of datatypes.