Adding and removing search fields in advanced search

It is possible to add and remove search fields on the advanced search page by editing the opac/parts/config.tt2 file in your template directory. Look for this section of the file:

search.adv_config = [
    {adv_label => l("Item Type"), adv_attr => ["mattype", "item_type"]},
    {adv_label => l("Item Form"), adv_attr => "item_form"},
    {adv_label => l("Language"),  adv_attr => "item_lang"},
    {adv_label => l("Audience"),  adv_attr => ["audience_group", "audience"], adv_break => 1},
    {adv_label => l("Video Format"), adv_attr => "vr_format"},
    {adv_label => l("Bib Level"), adv_attr => "bib_level"},
    {adv_label => l("Literary Form"), adv_attr => "lit_form", adv_break => 1},
    {adv_label => l("Search Library"), adv_special => "lib_selector"},
    {adv_label => l("Publication Year"), adv_special => "pub_year"},
    {adv_label => l("Sort Results"), adv_special => "sort_selector"},
];

For example, if you delete the line:

{adv_label => l("Language"),  adv_attr => "item_lang"},

the language field will no longer appear on your advanced search page. Changes will appear immediately after you save your changes.

You can also add fields based on Search Facet Groups that you create in the staff client’s Local Administration menu. This can be helpful if you want to simplify your patrons' experience by presenting them with only certain limiters (e.g. the most commonly used languages in your area). To do this,

  1. Click Administration → Local Administration → Search Filter Groups.
  2. Click New.
  3. Enter descriptive values into the code and label fields. The owner needs to be set to your consortium.
  4. Once the Facet Group is created, click on the blue hyperlinked code value.
  5. Click the New button to create the necessary values for your field.
  6. Go to the opac/parts/config.tt2 file, and add a line like the following, where Our Library’s Field is the name you’d like to be displayed next to your field, and facet_group_code is the code you’ve added using the staff client.

     {adv_label => l("Our Library's Field"), adv_filter => "facet_group_code"},