Re: [htmltmpl] how to determine if tmpl_var exists in a loop?
Brought to you by:
samtregar
From: Puneet K. <pk...@ei...> - 2004-04-17 16:10:36
|
On Apr 17, 2004, at 10:39 AM, <al...@lo...> wrote: > I don't know what you are trying to do, > but that doesn't seem like a good thing. > It feels like you're making the code overly complex. > You should think it through thoroughly to see > if theres a better way. > > Alan. > > > ----- Original Message ----- > From: "Kapoor, Nishikant" <nis...@xc...> > To: "H::T (E-mail)" <htm...@li...> > Sent: Friday, April 16, 2004 6:39 AM > Subject: [htmltmpl] how to determine if tmpl_var exists in a loop? > > > I have used > > if ($template->query(name => 'tmplVar')) {} > > to check if a tmpl_var exists in the template or not. > > How/what do I use for a tmpl_var inside a tmpl_loop? > > I am curious too... I've been using H-T for about a year and a half, and I've never had to query the template. My assumption is that params in the template are assigned by me, so I would automatically know what vars exist in the template. What is/are a typical circumstance(s) where I would not already know what vars exist in a template and would want to use query to find out? Thanks. |