Thanks Andy, it worked!
The simple test case looks like this:
[% MACRO custom(file) TRY;
PROCESS "$file";
CATCH file;
# do nothing - missing file is OK
CATCH;
THROW error.type error.info;
END
%]
[% custom("exists.atml") %] <--- includes file
[% custom("doesnotexist.atml") %] <--- does nothing
[% foo = %] <--- throws error
-myk
Andy Wardley wrote:
>On Wed, Sep 12, 2001 at 01:01:34PM -0700, Myk Melez wrote:
>
>>I want to put hooks into Bugzilla templates in places where I think it
>>is likely that installations will want to add customizations, for
>>example at the end of a list of MIME types to which I expect many
>>installations to add items.
>>
>
>How about something like this:
>
>[% MACRO custom(file) TRY;
> PROCESS "custom/$file";
> CATCH file;
> # do nothing - missing file is OK
> CATCH;
> # report error
> END
>%]
>
>And then:
>
>[% custom('header') %]
>
>blah blah
>
>[% custom('footer') %]
>
>etc.
>
>
>A
>
>
>_______________________________________________
>templates mailing list
>[EMAIL PROTECTED]
>http://www.template-toolkit.org/mailman/listinfo/templates
>