Customizing Notices & Slips with Template Toolkit

Join Lucas as he shows ways to customize your notices and slips using the template toolkit in Koha!

Examples from Webinar

### LOOP THROUGH CHECKOUTS in ISSUESLIP with TT ###
<div id="checkouts">
[% FOREACH checkout IN borrower.checkouts %]
<b>[% checkout.item.biblio.title %]</b>

MARC 245b: [% checkout.item.biblio.metadata.record.subfield('245', 'b') %] 
Barcode: [% checkout.item.barcode %] 
Date Due: [% checkout.item.checkout.date_due %] 
[% END %]
</div>

### TODAY'S CHECKOUTS ###
[%- USE date -%]
[%- manip = date.manip -%] 

[% today_issues = 0 %]
[% FOREACH checkout IN borrower.checkouts %]
[% cissue_date = manip.UnixDate(checkout.item.checkout.issuedate, "%Y-%m-%d") %]
[% crenew_date = manip.UnixDate(checkout.item.checkout.lastreneweddate, "%Y-%m-%d") %]
[% today = date.format(date.now, '%Y-%m-%d') %]
[% IF cissue_date == today || crenew_date == today %]
[% today_issues = today_issues + 1 %]
[% END %]
[% END %]
Items Checked Out Today: <b>[% today_issues %]</b>

### ADD Holds to ISSUE SLIP ###
[% FOREACH hold IN borrower.holds %]
[% hold.item.biblio.title %]
[% END %]

### HOLD SLIP Show Account Balance###
[%- USE Price -%]

[% IF borrower.account.balance >= 15 %]
Reminder: This patron owes BIG money, don't let them have this hold!
Account balance: [% borrower.account.balance %]
[% END %] 

Webinar

When: May 4, 2020

Time: 1:00 PM Eastern Time (US and Canada)

Topic: Customizing Notices & Slips with Template Toolkit

Register in advance for this webinar:

After registering, you will receive a confirmation email containing information about joining the webinar. This will be recorded and made available on demand.

Read more by Lucas Gass

Tags