name-readme.txt.tmpl 1.02 KB
[%# This Source Code Form is subject to the terms of the Mozilla Public
  # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

Normal templates go in this directory. You can load them in your
code like this:

use B[% %]ugzilla::Error;
my $template = B[% %]ugzilla->template;
$template->process('[% name FILTER lower %]/some-template.html.tmpl')
  or ThrowTemplateError($template->error());

That would be how to load a file called some-template.html.tmpl that
was in this directory.

Note that you have to be careful that the full path of your template
never conflicts with a template that exists in [% terms.Bugzilla %] or in 
another extension, or your template might override that template. That's why
we created this directory called '[% name FILTER lower %]' for you, so you
can put your templates in here to help avoid conflicts.