[Koha-bugs] [Bug 31339] Use Template::Toolkit WRAPPER for Koha Plugins
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Aug 11 08:52:58 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31339
--- Comment #2 from David Cook <dcook at prosentient.com.au> ---
For the moment, I'm including this wrapper template in my Koha plugin.
In my .pm file I do this:
my $wrapper_path = abs_path( $self->mbf_path( 'plugin-staff-wrapper.tt' ) );
$template->{VARS}->{wrapper_path} = $wrapper_path;
Then for each individual template I need for specific functionality, I can just
do this:
[% WRAPPER "$wrapper_path" %]
<h1>Plugin Name</h1>
[% END %]
--
Even if the wrapper isn't included in Koha core, it could mean updating just
the 1 wrapper template instead of updating every single template file because
there's a new header include needed or something.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list