Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Can i check various condition in <TMPL_IF> using HTML::Template

by dws (Chancellor)
on Jan 18, 2005 at 08:11 UTC ( [id://422925]=note: print w/replies, xml ) Need Help??


in reply to Can i check various condition in <TMPL_IF> using HTML::Template

If you need to check a non-trivial condition when using HTML::Template, you'll have to do it in code. E.g.,

$template->param(a_or_b_or_c => ($a || $b || $c)); ... <TMPL_IF a_or_b_or_c>

  • Comment on Re: Can i check various condition in <TMPL_IF> using HTML::Template
  • Download Code

Replies are listed 'Best First'.
Re^2: Can i check various condition in <TMPL_IF> using HTML::Template
by kprasanna_79 (Hermit) on Jan 18, 2005 at 08:39 UTC
    Hai dws
    I dont want to do it in cgi, i want it in template
    <TMPL_IF a || b || c>
    Is it possible
    --newbie

      I dont want to do it in cgi, i want it in template ... Is it possible

      No, it is not possible in the current release of HTML::Template. If what you want isn't going to go beyond a simple disjunction, then the trick reneeb lays out below will work, though it's going to involve some duplication in the template that you would avoid by calculating the expression in code.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://422925]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 02:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found