Cheers, Martin.

 

In the plugin I was working on, I’ve created even more complex templates (by setting footerjs in the WRAPPER directive), but that plugin isn’t public at the moment.

 

Actually, I’m probably going to not publish that plugin in the end, as it wasn’t scalable enough. The synchronous processing was just too slow. It would be tempting to rearchitect it to use asynchronous processing, but we’ll need more work done for on the task queue front for that.

 

Although this plugin has made me think more about what would be needed there:

 

I’ve been learning Gitlab CI lately and it’s essentially the same model (but without the RabbitMQ).

 

David Cook

Software Engineer

Prosentient Systems

72/330 Wattle St

Ultimo, NSW 2007

Australia

 

Office: 02 9212 0899

Online: 02 8005 0595

 

From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Renvoize, Martin
Sent: Tuesday, 8 September 2020 8:47 PM
To: Koha Devel <koha-devel@lists.koha-community.org>
Subject: Re: [Koha-devel] Using Template::Toolkit WRAPPER in Koha plugins

 

Looks like a nice approach to me, thanks for the example.


 

Martin Renvoize

Development Team Manager

Community Release Manager (19.11, 20.05)

Phone: +44 (0) 1483 378728

Mobile: +44 (0) 7725 985 636

Email: martin.renvoize@ptfs-europe.com

Fax: +44 (0) 800 756 6384

www.ptfs-europe.com

 

 

 

 

Registered in the United Kingdom No. 06416372   VAT Reg No. 925 7211 30

 

The information contained in this email message may be privileged, confidential and protected from disclosure. If you are not the intended recipient, any dissemination, distribution or copying is strictly prohibited. If you think that you have received this email message in error, please email the sender at info@ptfs-europe.com

 

 

 

On Fri, 4 Sep 2020 at 07:26, <dcook@prosentient.com.au> wrote:

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

 

_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/