From f1a3f932c86797aa7cdcbf37bf6f0dd35be803da Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 6 Sep 2012 09:23:08 -0400 Subject: [PATCH] Bug 4173: Followup: Document KohaAuthorisedValues plugin Content-Type: text/plain; charset="utf-8" --- Koha/Template/Plugin/KohaAuthorisedValues.pm | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/Koha/Template/Plugin/KohaAuthorisedValues.pm b/Koha/Template/Plugin/KohaAuthorisedValues.pm index 58297c0..68b1347 100644 --- a/Koha/Template/Plugin/KohaAuthorisedValues.pm +++ b/Koha/Template/Plugin/KohaAuthorisedValues.pm @@ -24,6 +24,24 @@ use base qw( Template::Plugin ); use C4::Koha; +=pod + +This plugin allows one to get the description for an authorised value +from within a template. + +First, include the line '[% USE KohaAuthorisedValues %]' at the top +of the template to enable the plugin. + +To use, call KohaAuthorisedValues.GetByCode with the category +of the authorised value, the code to look up, and optionally, +the OPAC flag ( if set, it will return the OPAC description rather +than the Intranet description ). + +For example: [% KohaAuthorisedValues.GetByCode( 'LOST', item.itemlost, 1 ) %] +will print the OPAC description for the LOST value stored in item.itemlost. + +=cut + sub GetByCode { my ( $self, $category, $code, $opac ) = @_; return GetAuthorisedValueByCode( $category, $code, $opac ); -- 1.7.2.5