A neat Template Toolkit trick...
j
From: Sean Baker Sent: Tuesday, September 26, 2006 1:03 PM I needed to [% INCLUDE %] a template
that could or could not exist. It was dying ungracefully in TT, and using
[% PERL %] to check to see if the directory and/or file exists was quite
ugly. Presto: [% TRY
%] [% INCLUDE "$rateInclude"
%] [% CATCH
%] [% END
%] |