From: mkanat%bugzilla.org <> Date: Tue, 20 Oct 2009 23:08:03 +0000 (+0000) Subject: Bug 394438: Add a hook for adding template vars to any page (Override Template->process) X-Git-Tag: bugzilla-3.5.1~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=700f6a062970e2c23510e3f6a47c88e069047a04;p=thirdparty%2Fbugzilla.git Bug 394438: Add a hook for adding template vars to any page (Override Template->process) Patch by Matt Rogers r=mkanat, a=mkanat --- diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index 2cd99c3e7c..51bce7fbeb 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -649,6 +649,37 @@ to the user. (F's C) =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 argument below). Otherwise, modifying the C argument +will affect every single template in Bugzilla. + +Params: + +=over + +=item C + +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 + +The name of the template being processed. This is relative +to the main template directory for the language (i.e. for +F