I saw now that you had some issues with that syntax. I've added your
code as another example to the wiki:
https://wiki.koha-community.org/wiki/Notices_and_Slips_Library#Checkouts_slip_using_only_Template_Toolkit
On 01.06.19 10:28, Katrin Fischer wrote:
Hi Michael and Jonathan,
I wanted to
Hi Michael and Jonathan,
I wanted to add this to the wiki and found that Joseph has added another
variation that might be a little more elegant as it doesn't require you
to change the notice template when changing itemtypes:
Hi Jonathan
> Replace the whole checkedout "loop" with the FOR loop
> The example in the test file should give you an idea about how to do
> that.
I have now replaced the original loop:
<> <>
Fällig am: <>
with the following:
[% FOREACH checkout IN checkouts %]
[%~ SET item =
Hi Michael,
This test
https://gitlab.com/koha-community/Koha/blob/master/t/db_dependent/Letters/TemplateToolkit.t#L602
will show you the exact equivalent of the template ISSUESLIP using the TT
syntax.
You can use both syntax in the same template, but you have to use the
variables that exist.
Hi Jonathan
> Replace the whole checkedout "loop" with the FOR loop
> The example in the test file should give you an idea about how to do
> that.
What test file do you mean? I can't find any hint on what the construct
"" actually does, neither in the Koha wiki nor
in the Koha manual.
Replace the whole checkedout "loop" with the FOR loop
The example in the test file should give you an idea about how to do that.
El vie., 17 may. 2019 07:49, Michael Kuhn escribió:
> Hi Jonathan
>
> Thanks for the code! I have included it as follows, but in fact the
> whole thing is in another
Hi Jonathan
Thanks for the code! I have included it as follows, but in fact the
whole thing is in another loop called "checkedout":
<> <>
[% USE ItemTypes %]
[% FOREACH checkout IN checkouts %]
[% ItemTypes.GetDescription(checkout.item.effective_itemtype) %]
[% END %]
Fällig am: <>
I
And so, this should work:
[% USE ItemTypes %]
[% FOREACH checkout IN checkouts %]
[% ItemTypes.GetDescription(checkout.item.effective_itemtype) %]
[% END %]
Le jeu. 16 mai 2019 à 13:46, Jonathan Druart
a écrit :
>
> Sorry, I am completely wrong.
>
> See an example in the test file:
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
a écrit :
>
> Hi Michael,
>
> ISSUESLIP
Hi Michael,
ISSUESLIP is not ready for TT syntax.
See also bug 15283.
Regards,
Jonathan
Le jeu. 16 mai 2019 à 09:40, Michael Kuhn a écrit :
>
> Hi
>
> Our notice ISSUESLIP does contain the following lines:
>
> <> <>
> <>
> Fällig am: <>
>
> Unfortunately the content of field "items.itype" is
Hi
Our notice ISSUESLIP does contain the following lines:
<> <>
<>
Fällig am: <>
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"
11 matches
Mail list logo