Re: [htmltmpl] extra whitespace

2006-02-08 Thread html-template-users
Rumour has it Alex Kapranoff, on or about 08.Feb.2006 12:57, whispered:
> * Alex Teslik <[EMAIL PROTECTED]> [February 08 2006, 20:43]:
>>Is there a switch (feature request?) that will tell HTMLTMPL to replace a
>> TMPL followed by [\n\r]+ with nothing - even better replace the whole line if



>> tag creates hard to read template files. In particular, this would be useful
>> for the TMPL_LOOP and TMPL_IF/UNLESS constructs.
> 
> That would be very useful option indeed if done well and fast.
> I'd use it everywhere.
> 

Oh yes indeedy.  Me too.

--
Chris Beck  -  http://pacanukeha.blogspot.com
He needs a lang shanket spoon that sups kail wi' the de'il


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______
Html-template-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/html-template-users


[htmltmpl] global_vars possible bug

2002-10-04 Thread html-template-users e-mails from neil prockter

Hello

I'm using global_vars but it does seem to work unless I referece the variable
in their outer level scope. By this I mean if I have loop A and loop B within
loop A the variable from conext A only appear in cointext B if they were
referenced in context A

using this code

my $template = HTML::Template->new(
filename => 'testfile',
die_on_bad_params => 0,
global_vars => 1,
loop_context_vars => 1
);

push @INNER_LOOP, { INNER_VAR => 'this is inner var' };
push @OUTER_LOOP, { OUTER_VAR => 'this is outer var', INNER_LOOP =>
\@INNER_LOOP };
$template->param( OUTER_LOOP => \@OUTER_LOOP );
print $template->output();

-

and taking the manual page example


 OUTER: 
   
  INNER: 
  INSIDE OUT: 
   


gives the expected

 OUTER: this is outer var

  INNER: this is inner var
  INSIDE OUT: this is outer var


however if I don't refer to OUTER_VAR in the OUTER_LOOP then INNER_LOOP
doesn't get it either i.e.


   
  INNER: 
  INSIDE OUT: 
   


gives

  INNER: this is inner var
  INSIDE OUT:


is this a bug?

TIA,

Neil


p.s.

   
  INNER: 
  INSIDE OUT: 
   
 OUTER: 


works fine




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users