Yeah--- that's much nicer than the way I've been doing it.
I checked the docs and of course that is in there, so someone might as well
tell me to RTFM. Sorry.
-dave
----- Original Message -----
From: "Brad Hilton" <[EMAIL PROTECTED]>
To: "David Ferrance" <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 11:53 PM
Subject: Re: [htmltmpl] empty TMPL_LOOPs - possible feature?
> On Fri, 7 Sep 2001, David Ferrance wrote:
>
> > Hi all,
> >
> > I often find myself writing code like this:
> >
> > <TMPL_IF NAME=COUNT>
> > <TMPL_LOOP NAME=BEAVIS>
> > I am the great <TMPL_VAR NAME=CORNHOLIO>!
> > </TMPL_LOOP>
> > <TMPL_ELSE>
> > I need TP for my bunghole!
> > </TMPL_IF>
> >
> > this causes me to have to write perl like this:
> >
> > $t->param(CORNHOLIO=>\@holio);
> > $t->param(COUNT=>$#holio>=0);
> >
>
> I do:
>
> <TMPL_IF NAME=BEAVIS>
> <TMPL_LOOP NAME=BEAVIS>
> I am the great <TMPL_VAR NAME=CORNHOLIO>!
> </TMPL_LOOP>
> <TMPL_ELSE>
> I need TP
> </TMPL_IF>
>
> This works because empty or non-defined loops evaluate to false. Is that
> what you're after?
>
> -Brad
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]