|
Lines 23-28
use base qw( Template::Plugin );
Link Here
|
| 23 |
|
23 |
|
| 24 |
use Koha::Plugins; |
24 |
use Koha::Plugins; |
| 25 |
|
25 |
|
|
|
26 |
=head1 NAME |
| 27 |
|
| 28 |
Koha::Template::Plugin::KohaPlugins - A module for adding hooks into Koha for plugins |
| 29 |
|
| 30 |
=head1 DESCRIPTION |
| 31 |
|
| 32 |
This plugin contains functions related to adding plugin hooks into various parts |
| 33 |
of Koha. |
| 34 |
|
| 35 |
To use, include the line '[% USE KohaPlugins %]' at the top of the template |
| 36 |
to enable the plugin |
| 37 |
|
| 38 |
=head2 Methods |
| 39 |
|
| 40 |
=head3 get_plugins_opac_head |
| 41 |
|
| 42 |
[% KohaPlugins.get_plugins_opac_head %] |
| 43 |
|
| 44 |
This method collects the output of all plugins with an opac_head method |
| 45 |
to output to the head section of opac pages. |
| 46 |
|
| 47 |
=cut |
| 48 |
|
| 26 |
sub get_plugins_opac_head { |
49 |
sub get_plugins_opac_head { |
| 27 |
return q{} |
50 |
return q{} |
| 28 |
unless C4::Context->preference('UseKohaPlugins') |
51 |
unless C4::Context->preference('UseKohaPlugins') |
|
Lines 39-44
sub get_plugins_opac_head {
Link Here
|
| 39 |
return join( "\n", @data ); |
62 |
return join( "\n", @data ); |
| 40 |
} |
63 |
} |
| 41 |
|
64 |
|
|
|
65 |
=head3 get_plugins_opac_js |
| 66 |
|
| 67 |
[% KohaPlugins.get_plugins_opac_js %] |
| 68 |
|
| 69 |
This method collects the output of all plugins with an opac_js method |
| 70 |
to output to the javascript section of at the bottom of opac pages. |
| 71 |
|
| 72 |
=cut |
| 73 |
|
| 42 |
sub get_plugins_opac_js { |
74 |
sub get_plugins_opac_js { |
| 43 |
return q{} |
75 |
return q{} |
| 44 |
unless C4::Context->preference('UseKohaPlugins') |
76 |
unless C4::Context->preference('UseKohaPlugins') |
| 45 |
- |
|
|