[Koha-devel] Using Template::Toolkit WRAPPER in Koha plugins

dcook at prosentient.com.au dcook at prosentient.com.au
Fri Sep 4 08:26:14 CEST 2020


Hi all,

 

I just wanted to share how I've used Template::Toolkit WRAPPER in a Koha
plugin. 

 

All the details are available at
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26381, but
basically it boils down to creating 1 wrapper template, and then invoking
that using the WRAPPER directive in individual Koha plugin templates like
report-step1.tt. 

 

It reduces the boiler plate required for each plugin template whether that
wrapper template is provided by the Koha plugin or by Koha (both approaches
have pros and cons). 

 

For a long time, I've wanted to use WRAPPER with Koha more broadly, but Koha
plugins provide a great opportunity for using them with no refactoring of
existing code.

 

Anyway, I hope that others find this useful. I'm going to have a bit of fun
with it.

 

David Cook

Software Engineer

Prosentient Systems

72/330 Wattle St

Ultimo, NSW 2007

Australia

 

Office: 02 9212 0899

Online: 02 8005 0595

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20200904/0eec8348/attachment.htm>


More information about the Koha-devel mailing list