And so, this should work: [% USE ItemTypes %] [% FOREACH checkout IN checkouts %] [% ItemTypes.GetDescription(checkout.item.effective_itemtype) %]<br /> [% END %]
Le jeu. 16 mai 2019 à 13:46, Jonathan Druart <[email protected]> a écrit : > > Sorry, I am completely wrong. > > See an example in the test file: t/db_dependent/Letters/TemplateToolkit.t > The variable 'checkout' does not exist, you need to loop on > 'checkouts' as there are several checkouts :) > > Le jeu. 16 mai 2019 à 13:42, Jonathan Druart > <[email protected]> a écrit : > > > > Hi Michael, > > > > ISSUESLIP is not ready for TT syntax. > > See also bug 15283. > > > > Regards, > > Jonathan > > > > Le jeu. 16 mai 2019 à 09:40, Michael Kuhn <[email protected]> a écrit : > > > > > > Hi > > > > > > Our notice ISSUESLIP does contain the following lines: > > > > > > <<biblio.title>> <<items.barcode>><br /> > > > <<items.itype>><br /> > > > Fällig am: <<issues.date_due>><br /> > > > > > > Unfortunately the content of field "items.itype" is coded, so the output > > > of the middle line is just "06" or "20" instead of the actual > > > description of the respectve item type (e. g. "CD" instead of 06, or > > > "DVD" instead of 20). We have tried to replace "<<items.itype>><br />" by > > > > > > [% IF items.itype == '06' %] CD<br /> > > > [% ELSIF items.itype == '20' %] DVD<br /> > > > [% ELSE %] > > > [% END %] > > > > > > or > > > > > > [% IF ( items.itype == '06' ) %] CD<br /> > > > [% ELSIF ( items.itype == '20' ) %] DVD<br /> > > > [% ELSE %] > > > [% END %] > > > > > > or > > > > > > [% IF ( items.itype == '06' ) %] CD<br />[% END %] > > > [% IF ( items.itype == '20' ) %] DVD<br />[% END %] > > > > > > or > > > > > > [% SWITCH items.itype %] > > > [% CASE '06' %] CD<br /> > > > [% CASE '20' %] DVD<br /> > > > [% END %] > > > > > > or > > > > > > [% IF items.itype %] > > > [% USE ItemTypes %] > > > [% ItemTypes.GetDescription(checkout.item.effective_itemtype) %]<br /> > > > [% END %] > > > > > > Though, none of these worked - nothing happened. Can anyone please tell > > > me the correct way how to achieve this, if this is possible at all? > > > > > > Best wishes: Michael > > > -- > > > Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis > > > Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz > > > T 0041 (0)61 261 55 61 · E [email protected] · W www.adminkuhn.ch > > > _______________________________________________ > > > Koha mailing list http://koha-community.org > > > [email protected] > > > https://lists.katipo.co.nz/mailman/listinfo/koha _______________________________________________ Koha mailing list http://koha-community.org [email protected] https://lists.katipo.co.nz/mailman/listinfo/koha

