> lvjin wrote:
> 
> Hi,
> Can I determine if a $variable has been set in .vm files
> 
> lvjin

You can test it with #if() :

#if( $foo )
  \$foo is set
#else
  \$foo is not set
#end

The only problem is that if $foo is boolean and false, you will get a
misleading answer.

(Hmmm.  Maybe something like #if( $foo == null ) would be useful here...
)

geir

-- 
Geir Magnusson Jr.                               [EMAIL PROTECTED]
Velocity : it's not just a good idea. It should be the law.
http://jakarta.apache.org/velocity


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to