[Bug 15278] [Omnibus] Port default slips and notices from bespoke syntax to Template Toolkit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15278 --- Comment #22 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- 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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org