Bug 4173: Followup: Document KohaAuthorisedValues plugin
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
95bcab8d62
commit
f362888e0c
|
|
@ -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 );
|
||||
|
|
|
|||
Loading…
Reference in New Issue