Is there a way to conditionally include/process a template from another 
template depending on whether or not the template being 
included/processed exists?

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.

So far I can see two options:

1. Use the DEFAULT configuration option to process some empty template 
when one is not found.  This does the job but cripples error detection 
for templates that really shouldn't be missing.

2. Create an empty template file for each hook.  This potentially 
clutters up the template directory with empty files.

For the MIME type example, it's possible that installations will want to 
edit the list itself rather than just adding items to it, so a third 
option is to put the entire list in a separate template file.  I can 
imagine other situations, however, where there isn't anything to put 
into the separate template file except what installations may add (f.e. 
adding custom fields to the bug report form).

Anyone else run into this problem?  Any other solutions?

-myk




Reply via email to