See:
http://www.template-toolkit.org/docs/plain/Manual/Syntax.html

Section: Capturing Block Output

Quote:
--------------------------------
Note one important caveat of using this syntax in conjunction with side-effect notation. The following directive does not behave as might be expected:


    [% var = 'value' IF some_condition %]
--------------------------------

Check the page for the rest.

-- Josh

qbxk wrote:
so i was getting confused but i think i understand now, what i don't understand is whether this is expected behavior:
ala:


[% foo = [] IF 1 %]
[% USE Dumper; Dumper.dump(foo) %]
prints: $VAR1 = 'ARRAY(0x206cd7f4)' (prints some such, of course it varies)


when
[% baz = [] %]  (or perhaps: [% IF 1 %][% baz = [] %][% END %] )
[% USE Dumper; Dumper.dump(baz) %]
prints:  $VAR1 = []

thanks.

peace,
-b
[EMAIL PROTECTED]

(shameless plug: template-toolkit in heavy use and advertised here: http://www.uvm.edu/wruv/?action=info&pg=thanks )

_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

!DSPAM:42391d9050571740919489!



_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to