[Koha-devel] Using Template::Toolkit MACRO in notice templates

dcook at prosentient.com.au dcook at prosentient.com.au
Tue Jul 5 04:28:31 CEST 2022


Hi all,

 

I noticed that
https://wiki.koha-community.org/wiki/Notices_with_Template_Toolkit didn't
have a section on macros, so I thought I'd write one:
https://wiki.koha-community.org/wiki/Notices_with_Template_Toolkit#Macros

 

I needed to print the 880 $6 245-01 in a few notices, so I figured I'd just
define my own function that I could stick at the top of the template, and
then just call as necessary throughout the template. 

 

That's what I've used as an initial example in the wiki as well:
https://wiki.koha-community.org/wiki/Notices_with_Template_Toolkit#Example:_
Fetch_880_.246245-01_titles 

 

--

 

It actually got me thinking how it could be interesting to have a system
preference like "NoticeGlobalTemplate" where we could define macros or
includes or whatever that could be applied to all notice templates like
"NoticeCSS". 

 

Do folk think that would be useful? At the moment, I have to copy and paste
my macros across all the notices I want, but if I could just have 1 place to
define them. that would be pretty cool. 

 

David Cook

Senior Software Engineer

Prosentient Systems

Suite 7.03

6a Glen St

Milsons Point NSW 2061

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/20220705/cb74e647/attachment.htm>


More information about the Koha-devel mailing list