https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15278

--- Comment #22 from Emily Lamancusa <[email protected]> 
---
Hmmm, I hadn't actually thought about replacing the digest syntax... [% FOREACH
%] doesn't work for digest-building, because the ---- marker doesn't represent
a piece of logic or substitution internal to one notice, but rather it's
metadata that tells the code how to parse and store the prepared message so
that a new message can be combined properly with an old message after the fact,
without duplicating the parts that should be the same:

> sub _metadata {
>    my ($letter) = @_;
>    if ($letter->{content} =~ /----/) {
>        my ($header, $body, $footer) = split(/----\r?\n?/, $letter->{content});
>        return {
>            header => $header,
>            body   => [$body],
>            footer => $footer,
>        };
>    } else {
>        return {
>            header => '',
>            body   => [$letter->{content}],
>            footer => '',
>        };
>    }
> }

Is that something we can (usefully) replace with Template Toolkit? (this may
also be a "next step" question, to avoid making the perfect the enemy of the
good)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to