Re: [htmltmpl] TMPL_IF and OR
Brought to you by:
samtregar
From: Mark F. <mar...@ea...> - 2005-01-15 01:18:12
|
From: "Thomas Gutzler" <gi...@gm...> > Could something like this be possible: Why not say: <TMPL_VAR NAME=FOO_BAR> And then perform the conditional processing in your Perl program to set $my_foo_bar and output it to the template thusly: $template->param(FOO_BAR => $my_foo_bar); Otherwise you could do TMPL_IF and TMPL_ELSE <TMPL_IF NAME=FOO> <TMPL_IF NAME=BAR>foo or bar <TMPL_ELSE>foo </TMPL_IF> <TMPL_ELSE>bar </TMPL_IF> If it were me, I'd rather keep this kind of logic in your template or script. TMPL_ELSE_IF would be kind of nice to reduce the clutter. Mark ----- Original Message ----- From: "Thomas Gutzler" <gi...@gm...> To: <htm...@li...> Sent: Friday, January 14, 2005 1:35 PM Subject: [htmltmpl] TMPL_IF and OR > Hi, > I'm new to this list and couldn't find anything comparable to this in > the archives: > I have a feature request. > Could something like this be possible: > > <TMPL_IF NAME=FOO>foo</TMPL_IF> > <TMPL_IF NAME=FOO OR NAME=BAR>foo or bar</TMPL_IF> > <TMPL_IF NAME=BAR>bar</TMPL_IF> > > Wouldn't that be nice? > > Cheers, Tom > -- > Mosher's Law of Software Engineering: > Don't worry if it doesn't work right. If everything did, you'd > be out of a job. > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users |