[Koha-bugs] [Bug 26381] Koha should provide Koha plugins with a template to use with Template::Toolkit WRAPPER
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Sep 4 08:21:32 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26381
--- Comment #3 from David Cook <dcook at prosentient.com.au> ---
(In reply to David Cook from comment #2)
> I think that I could also be happy with Koha plugin specific wrappers, so
> long as they could be reusable within the same plugin.
>
> I need to play with the INCLUDE directive a bit to see whether or not Koha
> needs to be patched to add include directories for plugins...
Here's a solution:
MyPlugin.pm:
my $template = $self->get_template({ file => 'report-step1.tt' });
my $wrapper = $self->mbf_path('wrapper.tt');
$template->param( plugin_wrapper => $wrapper, );
report-step1.tt:
[% WRAPPER $plugin_wrapper
name = 'My Plugin'
breadcrumb = 'My Plugin'
%]
<div>Plugin content</div>
[% END %]
Excellent!
There's other ways we could do this, but that worked pretty well.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list