Share » Forums » Developer » Do you have xxx attribute? I wonder!

Do you have xxx attribute? I wonder!

Do you have xxx attribute? I wonder!

Wednesday 07 October 2009 10:00:30 am - 1 reply

Author Message

Gaetano Giunta

Wednesday 07 October 2009 10:32:02 am

Using $node.data_map, you get an array of all the attributes, where the array keys are the attribute names.

So using is_set($node.data_map.body) should work to test it attribute "body" is present.

If you have different attributes with the same name in different classes (eg. body is either a line of text or an xml block) you can use {attribute_view_gui} in your node template to avoid hardcoding a lot of "if" switches...

Principal Consultant International Business
Member of the Community Project Board

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu