|
|
Choosing A Webhost: |
Re: TMPL_IF and TMPL_ELSE - how do I use this?: msg#00040lang.perl.modules.html-template
LDT wrote: I've read the documentation sections on TMPL_IF and TMPL_ELSE. The part where I'm getting stuck is figuring out how to set up that "BOOL" value. I know if "BOOL" is true, then the section in TMPL_IF is run; if it's false, the section in TMPL_ELSE is run. This sounds like what I want to do (I think...). you will have to set up some variable that is present in every row, and then set that variable to 1 or 0... @rows = ( {drillable=>0......}, {drillable=>0......}, {drillable=>1......} ); then, in your loop <tmpl_loop rows> <tmpl_if drillable>print drillable cells<tmpl_else>print cells</tmpl_if> </tmpl_loop> ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | TMPL_IF and TMPL_ELSE - how do I use this?, LDT |
|---|---|
| Next by Date: | Re: TMPL_IF and TMPL_ELSE - how do I use this?, Timm Murray |
| Previous by Thread: | TMPL_IF and TMPL_ELSE - how do I use this?, LDT |
| Next by Thread: | Re: TMPL_IF and TMPL_ELSE - how do I use this?, Timm Murray |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |