]> git.evergreen-ils.org Git - Evergreen.git/blob - docs/TechRef/alternate_graphic_fields.txt
LP#1657282: fix redirect of one-hit metarecord searches
[Evergreen.git] / docs / TechRef / alternate_graphic_fields.txt
1 Display alternate graphic (880) fields
2 ======================================
3
4 By default, Evergreen displays alternate graphic fields, if any, for
5 contributors (1xx / 7xx), titles (245), edition statements (250), imprints
6 (260), notes (5xx), subjects (6xx), and series (4xx / 8xx) in search results and record details
7 per the Library of Congress MARC21 specifications:
8
9 * http://www.loc.gov/marc/bibliographic/bd880.html
10 * http://www.loc.gov/marc/bibliographic/ecbdcntf.html
11 * http://www.loc.gov/marc/bibliographic/ecbdmulti.html (Model A)
12
13 Default display
14 ---------------
15 In general, alternate graphic fields display below the corresponding
16 primary field. One exception is the attribution summary on the record details
17 page, in which the alternate graphic field contents display between the
18 primary field content and the attribution statement. To support CSS
19 customizations, HTML elements for the graphic fields have the class attribute
20 value `graphic880`.
21
22 Implementation details
23 ----------------------
24 The template file `parts/misc_util.tt2` defines two macros for retrieving
25 linked 880 fields:
26
27 * `get_graphic_880s`: given a _target_field_ scalar value representing a MARC
28   field tag, populate the _graphic_880s_ list with hashes containing the
29   target field tag and any graphic fields linked to that particular tag, with
30   the values for each being a simple concatenation of all subfields that are
31   not control subfields (per
32   http://www.loc.gov/marc/bibliographic/ecbdcntf.html). The structure of the
33   `graphic_880s` list is as follows:
34 +
35 ------------------------------------------------------------------------
36 [
37     {
38         "primary": {"occur": 01, "value": "foo foo"},
39         "graphic": [
40             {
41                 "occur": 01,
42                 "value": "bar bar",
43                 "orient": "rtl",
44                 "script": "CJK"
45             }
46         ]
47     }
48 ]
49 ------------------------------------------------------------------------
50 * `get_linked_880s` macro iterates over the content of the `linked_fields`
51   list, in which each element of the list to be a scalar representing the $6
52   control subfield link info. The macro populates the `graphics` list with a
53   set of graphic field hashes with the following structure:
54 +
55 ------------------------------------------------------------------------
56 [
57     {
58         "occur": 01,
59         "value": "bar bar",
60         "orient": "rtl",
61         "script": "CJK"
62     }
63 ]
64 ------------------------------------------------------------------------
65
66 `misc_util.tt2` preserves legacy attribute lists to enable previous TPAC
67 customizations to continue to function normally.