[Koha] Libraries, template toolkit and notices

Renvoize, Martin martin.renvoize at ptfs-europe.com
Sat Oct 28 05:01:28 NZDT 2023


This is an interesting requirement and actually reminds me of the
development work I did for accounts notices/receipts.  In that piece I set
up code to look for more specific versions of notice prior to defaulting to
the existing ones.. so for example we look for a notice with code "
'CREDIT_'.$credit->type " before falling back to "ACCOUNT_CREDIT" should
the more specific option not exist.

I could see it being a fairly simple development to add such functionality
to some other notices if you thought to worthwhile.  Of course, it would
need good documentation to make it clear such an option exists.

Just a thought and touting for development work as usual ;).

Martin

On Fri, 27 Oct 2023, 3:53 pm Stephen Graham, <s.graham4 at herts.ac.uk> wrote:

> Cheers Lisette. TT could definitely be an option then. ATM, we like to
> have the email/notice subject tailored to the specific items we are mailing
> about, but I guess we could have a generic subject line. I think my main
> concern is the potential length of the notices and looking a little
> intimidating for circulation staff with all the potential TT logic.
>
> Stephen
>
> From: Lisette Scheer <lisette at bywatersolutions.com>
> Sent: Thursday, October 26, 2023 4:54 PM
> To: Stephen Graham <s.graham4 at herts.ac.uk>
> Cc: koha at lists <koha at lists.katipo.co.nz>
> Subject: Re: [Koha] Libraries, template toolkit and notices
>
> You don't often get email from lisette at bywatersolutions.com<mailto:
> lisette at bywatersolutions.com>. Learn why this is important<
> https://aka.ms/LearnAboutSenderIdentification>
> Hi Stephen,
> You can definitely use TT if you only want to change the text:
> You can't change when triggers are for the overdue messages based on item
> type though.
>
> You can also change only specific information. For example if you want to
> have the same intro and signature, you could do:
> Hello [% borrower.firstname %],
> [% IF item.itype== "HOTSPOT"  %]
> hotspot message
> [% ELSIF item.typetype=="LAPTOP"  %]
> laptop message
> [% ELSE  %]
> Anything else
> [% END  %]
> Thank you for using the Library!
>
> On Thu, Oct 26, 2023 at 8:23 AM Stephen Graham <s.graham4 at herts.ac.uk
> <mailto:s.graham4 at herts.ac.uk>> wrote:
> Hi Koha Users - I have a question regarding the best way to send different
> email notices for different items when you want to include completely
> different email text. The last time I looked at using the template toolkit
> functionality in a notice it seemed that if a user had several different
> item types, the TT would allow me to check the item type and act
> accordingly, but only within one email. So if we wanted to send "radically"
> different emails for different items types, then it wasn't really possible
> because all the information would be contained in one long email. Not sure
> if this is still the case? For example, we loan out PCs for a year, and
> when we want to send PREDUEDGST emails then all the instructions and
> information is completely different than what we say when the item is a
> book or a Chromebook etc.
>
> What we have done in the past to get around this is to create a new
> library for some of our different items, then for PREDUEDGST we can run the
> advance_notices.pl<http://advance_notices.pl> script with the
> --digest-per-branch and that would send separate emails based on library.
> For our ODUE notices we have a separate notice for each library - e.g. we
> have a Laptop Locker library with it's own associated notice and a default
> "all libraries"  notices which deals with book items.
>
> We are just wondering how other people deal with this, and what the best
> practice would be. Happy to use TT if it can send several emails rather
> than one, but creating new Libraries just to send different notices seems
> "wrong".
>
> Cheers, Stephen
>
> --------------------------------------
> Stephen Graham
> Library Technology Consultant
> Library and Computing Services
>
> University of Hertfordshire
> Hatfield, Hertfordshire, AL10 9AB
>
> Email: s.graham4 at herts.ac.uk<mailto:s.graham4 at herts.ac.uk><mailto:
> s.graham4 at herts.ac.uk<mailto:s.graham4 at herts.ac.uk>>
> Website: herts.ac.uk<http://herts.ac.uk>
>
> _______________________________________________
>
> Koha mailing list  http://koha-community.org<http://koha-community.org>
> Koha at lists.katipo.co.nz<mailto:Koha at lists.katipo.co.nz>
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha<
> https://lists.katipo.co.nz/mailman/listinfo/koha>
> _______________________________________________
>
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>


More information about the Koha mailing list