http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9703 Bug ID: 9703 Summary: Add optional parameter "as_string" to GetRecordValue subroutine Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: dcook@prosentient.com.au Currently, the GetRecordValue subroutine returns an array of hashes, which must be looped through to retrieve results. On the template, you write the following code [% FOREACH subtitle %][% subfield %][% END %]. The problem with this is when you're trying to use the Keyword to MARC Mapping to over-write a field in the template that is already written as a single variable (e.g. [% author %]). Of course, you can loop through the array of hashes on the Perl side and pass a string to the template (i.e. opac-detail.tt or detail.tt). However, you're going to have to reproduce this iterator code every time you want to use GetRecordValue to produce a string. So, I figured that it made sense to add an optional parameter to the sub to trigger a condition so as to return a string of concatenated values rather than an array of hashes. --- Note: My ideal goal is to make it so that one can use the Keyword to MARC Mapping to specify any (or almost any) field on the detail pages. At the moment, I'm focusing on author, but I figure physical description will be another good one, as the template shows a bare minimum of the 3xx fields/subfields (in the incorrect order last I looked), --- Note, adding this optional parameter does NOT at all change the existing use of the GetRecordValue sub. The idea is hopefully to eliminate boilerplate by centralizing the "as string" code in this sub. -- You are receiving this mail because: You are watching all bug changes.