Forums / Developer / Testing an attribute content

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

Testing an attribute content

Author Message

Virgilio Lemos

Friday 23 October 2009 11:22:23 am

I need to display a content of "plano" attribute but only if it has a determined value.

attribute_view_gui attribute=$node.object.data_map.plano 

</code>How can I test the content of the attribute before display it?

Paul Borgermans

Friday 23 October 2009 1:41:37 pm

While I don't know the dataype for this attribute, inspect

{$node.object.data_map.plano.content|attribute(show)}

In your template and possibly use one of the elements there

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Piotrek Karaś

Saturday 24 October 2009 7:49:18 am

Isn't it about:

{if $node.object.data_map.plano.has_content}
...
{/if}

?

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu