diff options
author | mkanat%bugzilla.org <> | 2009-10-21 01:08:03 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-10-21 01:08:03 +0200 |
commit | 700f6a062970e2c23510e3f6a47c88e069047a04 (patch) | |
tree | d53c1c06e4f64c4978d666be6131258d1582e1bd /Bugzilla/Hook.pm | |
parent | 41d57c9f222ccf154eda5ecc2db94b406029a71c (diff) | |
download | bugzilla-700f6a062970e2c23510e3f6a47c88e069047a04.tar.gz bugzilla-700f6a062970e2c23510e3f6a47c88e069047a04.tar.xz |
Bug 394438: Add a hook for adding template vars to any page (Override Template->process)
Patch by Matt Rogers <mattr@kde.org> r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla/Hook.pm')
-rw-r--r-- | Bugzilla/Hook.pm | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index 2cd99c3e7..51bce7fbe 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -649,6 +649,37 @@ to the user. (F<sanitycheck.cgi>'s C<Status>) =back +=head2 template-before_process + +This hook allows you to define additional variables that will be available to +the template being processed. You probably want to restrict your hook +to operating only if a certain file is being loaded (which is why you +get a C<file> argument below). Otherwise, modifying the C<vars> argument +will affect every single template in Bugzilla. + +Params: + +=over + +=item C<vars> + +The template vars hashref--these are the values that get passed to the +template. Adding new keys to this hashref will cause those new values +to also get passed to the template. + +=item C<file> + +The name of the template being processed. This is relative +to the main template directory for the language (i.e. for +F<template/en/default/bug/show.html.tmpl>, this variable will contain +C<bug/show.html.tmpl>). + +=item C<template> + +The L<Bugzilla::Template> object that C<process> was called on. + +=back + =head2 webservice This hook allows you to add your own modules to the WebService. (See |