Forums / Setup & design / How do I create an IF Then Statement
Clay Pereira
Thursday 19 February 2004 4:12:48 pm
How do and if null caseExample:
IF $node.object.data_map.author <> Null <h3>By:{attribute_view_gui attribute=$node.object.data_map.author}</h3> else <h3>No Author</h3>
Sorry For the newbie Question. Can't figure out how to check variables.
Thursday 19 February 2004 4:43:50 pm
I don't know if I am one the right track... This is what I have tried so far....
{switch match=$node.object.data_map.author.data_text} {case match=""} <h3>By:{attribute_view_gui attribute=$node.object.data_map.author}</h3> {/case}{/switch}
Thursday 19 February 2004 5:28:35 pm
I tried this too....
{section show=$node.object.data_map.author|null( ) <h3>By:{attribute_view_gui attribute=$node.object.data_map.author}</h3>{/section}
Thursday 19 February 2004 6:22:29 pm
Well I figured it out after all. Here is what I did.
{section show=ne($node.object.data_map.author.content)} <h3>By:{attribute_view_gui attribute=$node.object.data_map.author}</h3>{/section}
Marko Pohl
Friday 20 February 2004 12:41:28 am
have a look at this:
http://ez.no/ez_publish/documentation/development/libraries/ez_template/operators/control_structure_handling
But i think this is only suitable for 'tiny' conditions...