Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    OPAC: Enhancing the New Search Box in the Quick Search Bar

    Created By: Denise Dunham
    Created on: 5/14/2019



    [This article was copied from the Voyager Wiki.]

    Introduction

    This relates to the "New" Tomcat WebVoyage user interface that is included in Voyager 7.0.1 and forward.
    This code was developed by Denise Dunham and she gets full credit for it.
    We have found that the "New Search" box in the WebVoyage Quick Search bar is much more useful when the type of search can be selected from among a set of search types (see following screenshot). 
    This code allows you to do that. 

    Change the code in the buildQuickSearch stanza of your header.xsl file to the following.

    Remember to back up your known good file and test your changes carefully.

    <xsl:template name="quickSearchBar">

     

       <xsl:for-each select="/page:page/page:searchQuick">

          <div id="quickSearchBar" title="{$headerText/quickSearchBar}">

             <form action="{page:element[@nameId='page.searchQuick.go.button']/page:buttonAction}" method="get">

                <span id="quickSearchArg" title="{/page:page//page:element[@nameId='searchArg']/page:label}">

                   <xsl:call-template name="buildFormInput">

                      <xsl:with-param name="eleName"  select="'searchArg'"/>

                      <xsl:with-param name="size"  select="'36'"/>

                   </xsl:call-template>

                </span> in

                <!-- LG -->

    <!-- search indexes from denise dunham -->

                <select id="searchCode" name="searchCode" title="Select the index to search.">

                    <option value="GKEY^*" selected="">Keyword(s) Anywhere</option>

                    <option value="TALL">Title (omit leading articles)</option>

                    <option value="TKEY^*">Title Keyword(s)</option>

                    <option value="JALL">Journal Title (omit leading articles)</option>

                    <option value="JKEY^*">Journal Title Keyword(s)</option>

                    <option value="NAME+">Author (last name, first name)</option>

                    <option value="NKEY^*">Author Keyword(s)</option>

                    <option value="SUBJ">Subject Heading</option>

                    <option value="CMD*">Boolean (and/or/not)</option>

                    <option value="CALL">Call Number</option>

                </select>

                <span id="searchButton" title="{//page:element[@nameId='page.searchQuick.go.button']/page:buttonMessage}">

                   <input type="submit"

                          alt="{//page:element[@nameId='page.searchQuick.go.button']/page:buttonMessage}"

                          value="{//page:element[@nameId='page.searchQuick.go.button']/page:buttonText}"

                          id="quickSearchButton"/>

                </span>

     

                <span id="searchHistory" title="{//page:element[@nameId='page.searchQuick.searchHistory.link']/page:linkText}">

                   <span id="searchHistoryIcon">&#160;</span>

                   <xsl:call-template name="buildLinkType">

                      <xsl:with-param name="eleName"  select="'page.searchQuick.searchHistory.link'"/>

                   </xsl:call-template>

                </span>

                 

    <!-- note you need to comment out the "searchCode" line below -->

              <!--  <input type="hidden" name="searchCode" value="{page:element[@nameId='searchCode']/page:label}"/> -->

                <input type="hidden" name="searchType" value="{page:element[@nameId='searchType']/page:label}"/>

                <input type="hidden" name="recCount" value="{page:element[@nameId='recCount']/page:label}"/>

             </form>

          </div>

       </xsl:for-each>

    </xsl:template>




    • Was this article helpful?