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

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.