Gossamer Forum
Quote Reply
Template condition
I have defined a global, let's call it myglobal, which takes two arguments, and either returns the value 1 or 0.

I would like to use it as follows:
Code:
<%if myglobal($arg1,$arg2)%>
do something useful
<%else%>
do something even more useful
<%endif%>
However, this doesn't seem to work, it always does the "else" thing even if myglobal returns 1. I can get it working if I do
Code:
<%set a=myglobal($arg1,$arg2)%>
<%if a%>
....

Am I missing something, or is this indeed how I have to do it?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Subject Author Views Date
Thread Template condition yogi 2263 May 14, 2002, 12:23 AM
Post Re: [yogi] Template condition
webmaster33 2187 May 14, 2002, 12:57 AM
Post Re: [yogi] Template condition
Paul 2155 May 14, 2002, 2:59 AM