Re: [htmltmpl] Re: Patches for HTML-Template-2.5.tar.gz
Brought to you by:
samtregar
From: Philip S T. <phi...@gm...> - 2002-07-25 05:07:58
|
On Wed, 24 Jul 2002, Sam Tregar wrote: > > <TMPL_VAR NAME="PARAMETER_NAME" VALUE="default value"> > > Some people will like this, I imagine. Maybe call it "DEFAULT"? I think > I might take this as a separate patch. What do others think? I'd agree with this. the default="" parameter would be quite useful to me. > > 6. add __count__ to loops > > > > <TMPL_VAR NAME="__count__">-th record in the loop. Count is useful in many cases, but would really only be convenience. Not sure if it should be called __COUNT__ or __INDEX__ though. Then of course, we could have __INDEX__ be the record number, and __COUNT__ be the total number of records. Heh. Ok, just kidding. What I would really like to see though is a <tmpl_elseif> and <tmpl_elseunless>. That would really clean up some of my templates that have too many nested ifs. It would specially make sense with multi state scripts that need to show a different body after every step of a form processing, but a lot of common stuff. (Is this what CGI::Application does?) Philip |