]> git.evergreen-ils.org Git - Evergreen.git/blob - docs/admin/search_interface.adoc
Docs: making tt2 docs more modular
[Evergreen.git] / docs / admin / search_interface.adoc
1 Designing the patron search experience
2 ======================================
3
4 Editing the formats select box options in the search interface
5 ---------------------------------------------------------------
6
7 You may wish to remove, rename or organize the options in the formats select
8 box. This can be accomplished from the staff client.
9
10 . From the staff client, navigate to *Administration -> Server Administration ->  Marc Coded
11 Value Maps* 
12 . Select _Type_ from the *Record Attribute Type* select box.
13 . Double click on the format type you wish to edit.
14
15 To change the label for the type, enter a value in the *Search Label* field.
16
17 To  move the option to a top list separated by a dashed line from the others,
18 check the *Is Simple Selector* check box.
19
20 To hide the type so that it does not appear in the search interface, uncheck the
21 *OPAC Visible* checkbox.
22
23 Changes will be immediate.
24
25 Adding and removing search fields in advanced search
26 -----------------------------------------------------
27
28 It is possible to add and remove search fields on the advanced search page by
29 editing the _opac/parts/config.tt2_ file in your template directory. Look for
30 this section of the file:
31
32 ----
33 search.adv_config = [
34     {adv_label => l("Item Type"), adv_attr => ["mattype", "item_type"]},
35     {adv_label => l("Item Form"), adv_attr => "item_form"},
36     {adv_label => l("Language"),  adv_attr => "item_lang"},
37     {adv_label => l("Audience"),  adv_attr => ["audience_group", "audience"], adv_break => 1},
38     {adv_label => l("Video Format"), adv_attr => "vr_format"},
39     {adv_label => l("Bib Level"), adv_attr => "bib_level"},
40     {adv_label => l("Literary Form"), adv_attr => "lit_form", adv_break => 1},
41     {adv_label => l("Search Library"), adv_special => "lib_selector"},
42     {adv_label => l("Publication Year"), adv_special => "pub_year"},
43     {adv_label => l("Sort Results"), adv_special => "sort_selector"},
44 ];
45 ----
46
47 For example, if you delete the line:
48
49 ----
50 {adv_label => l("Language"),  adv_attr => "item_lang"},
51 ----
52
53 the language field will no longer appear on your advanced search page. Changes
54 will appear immediately after you save your changes.
55
56 You can also add fields based on Search Facet Groups that you create in the
57 staff client's Local Administration menu. This can be helpful if you want to
58 simplify your patrons' experience by presenting them with only certain
59 limiters (e.g. the most commonly used languages in your area).  To do this,
60
61 . Click *Administration -> Local Administration -> Search Facet Groups*.
62 . Click *New*.
63 . Enter descriptive values into the code and label fields.  The owner needs to
64 be set to your consortium.
65 . Once the Facet Group is created, click on the blue hyperlinked code value.
66 . Click the *New* button to create the necessary values for your field.
67 . Go to the _opac/parts/config.tt2_ file, and add a line like the following,
68 where *Our Library's Field* is the name you'd like to be displayed next to
69 your field, and *facet_group_code* is the code you've added using the staff
70 client.
71 +
72 ----
73  {adv_label => l("Our Library's Field"), adv_filter => "facet_group_code"},
74 ----
75
76 Changing the display of facets and facet groups
77 -----------------------------------------------
78
79 Facets can be reordered on the search results page by editing the
80 _opac/parts/config.tt2_ file in your template directory.  
81
82 Edit the following section of _config.tt2_, changing the order of the facet
83 categories according to your needs:
84
85 ----
86
87 facet.display = [
88     {facet_class => 'author',  facet_order => ['personal', 'corporate']},
89     {facet_class => 'subject', facet_order => ['topic']},
90     {facet_class => 'series',  facet_order => ['seriestitle']},
91     {facet_class => 'subject', facet_order => ['name', 'geographic']}
92 ];
93
94 ----
95
96 You may also change the default number of facets appearing under each category
97 by editing the _facet.default_display_count_ value in _config.tt2_. The default 
98 value is 5.
99
100