hi, thank you all for the tips! That helps me a lot!
Regards, -Vlada B. On 07/01/2011 08:10 AM, Andrew Beattie wrote: > I would say that first, you need to chomp whitespace. -%] is your friend > > Then you explicitly add it in when you want it. > > $ cat input2.tt2 > ------------------- > [% IF var1 %][% 'first = ' _ var1 _ "\n" %][% END -%] > [% IF var2 %][% 'second = ' _ var2 _ "\n" %][% END -%] > [% IF var3 %][% 'third = ' _ var3 _ "\n" %][% END -%] > [% IF var4 %][% 'fourth = ' _ var4 _ "\n" %][% END -%] > ------------------- > $ tpage --define var1=1st --define var3=3rd input2.tt2 > ------------------- > first = 1st > third = 3rd > ------------------- > $ > > Andrew > > > _______________________________________________ > templates mailing list > [email protected] > http://mail.template-toolkit.org/mailman/listinfo/templates _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
