On Tue, 16 Jul 2002, Fran Fabrizio wrote: > Given a TMPL_LOOP variable foo, is there a way to find the length of the > array from within the template? Like <TMPL_VAR EXPR="scalar(foo)"> ? > The perldoc doesn't mention scalar support, but I didn't know if > another HTML::Template trick might exist.
No, there isn't. > Second, I found a bug in the expression parser, I'm slammed at work so > full details will be provided if necessary when I get a chance, but the > gist of it is that this breaks: > > <tmpl_if expr="user_id != -1> > > Basically, any negative number, put either before of after the !=, > breaks this. Couldn't quite figure out a way to quote it to get around > it. I'll send more details soon if needed, just let me know. Yup, this is a bug. Negative numbers don't work. A workaround for now would be: <tmpl_if expr="user_id ne '-1'"> Thanks for the report! -sam --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
