Forums / Setup & design / {switch} {case} will not Work!!!?!?!
Douglas Johnson
Wednesday 23 July 2003 2:22:18 pm
{let ......} {section} {switch name=navcheck match=$node.name} {case match!="Metal-Fab Inc."} ................ statements ..... {/case} {/switch} {/section}{/let}
Alex Jones
Wednesday 23 July 2003 2:27:42 pm
Douglas, {switch} {case} should work. Could you post some specifics as to the problem you are encountering?
Alex
Alex [ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ] <i>When in doubt, clear the cache.</i>
Wednesday 23 July 2003 2:32:38 pm
Thanks Alex.
I think it has something to do with either the "!=" or the "match=$node.name". When I have:
{switch name=navcheck match="99"}
{case match!="22"}
It works! But not with the variable $node.name???? Any ideas.
Wednesday 23 July 2003 2:42:53 pm
OK, the problem is with the "!=". Is this a valid operator? If not, what do I use for not equal? I have tried ne and <> but niether work???
Kjerand Pedersen
Wednesday 23 July 2003 3:00:23 pm
To use the 'ne' operator, to this:
{section show=$node.name|ne("Home")} ...statements...{/section}
Or use Switch as in my reply to your other post.