<<

Bugzilla::Template

NAME

Bugzilla::Template - Wrapper around the Template Toolkit Template object

SYNOPSIS

  my $template = Bugzilla::Template->create;
  my $format = $template->get_format("foo/bar",
                                     scalar($cgi->param('format')),
                                     scalar($cgi->param('ctype')));

DESCRIPTION

This is basically a wrapper so that the correct arguments get passed into the Template constructor.

It should not be used directly by scripts or modules - instead, use Bugzilla->instance->template to get an already created module.

SUBROUTINES

precompile_templates($output)

Description: Compiles all of Bugzilla's templates in every language. Used mostly by checksetup.pl.

Params: $output - true if you want the function to print out information about what it's doing.

Returns: nothing

METHODS

get_format($file, $format, $ctype)
 Description: Construct a format object from URL parameters.

 Params:      $file   - Name of the template to display.
              $format - When the template exists under several formats
                        (e.g. table or graph), specify the one to choose.
              $ctype  - Content type, see Bugzilla::Constants::contenttypes.

 Returns:     A format object.

SEE ALSO

Bugzilla, Template

<<