Is there an easy way to discover if a template exists? Bugzilla allows a
page in various formats and content types, which we basically append to
the template name. Currently, we only give the generic 'file not found'
message from TT, displayed as a Bugzilla internal error, but we want ot
detect this at the start of the script and error out gracefully.
Template::Context->template doesn't work because I'd have to parse the
error message for the 'file not found' error text, which seems a bit
fragile.
Currently I'm just iterating over $template->context->{LOAD_TEMPLATES}.
That works fine, but it misses out on some of the logic in
$template->context->template(). Bugzilla doesn't actually use any of the
extra stuff, but it would be nice if there was a more generic/supported
way to do this.
Bradley
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates