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

    OPAC: Remove Limits from Advanced Search

    Created By: Laura Guy
    Created on: 5/14/2019



    [This article was copied from the Voyager Wiki.]

    Introduction

    This relates to the "New" Tomcat WebVoyage that is included in Voyager 7.0.1 and forward.

    We have several special collections databases that contain only bibliographic records – there is no circulation function related to these databases, and no patron data. Thus we wanted to remove several default aspects of the new user interface, including removing the limits that appear on the Advanced search page. You can also, very easily, use this method to comment out individual limits and prevent them from displaying in the limit listing.

    Remove Search Limits from Advanced Search Page

    To remove the limits from the Advanced search page, comment out or delete the appropriate buildSearchForm sections in the cl_searchAdvanced.xsl file found at: /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/your_SKIN/xsl/contentLayout

    Code Example

    Change this code: 

    <!-- ##################### -->

     <!-- ## buildSearchForm ## -->

     <!-- ################################################################################ -->

     

    <xsl:template name="buildAdvancedSearch">

     

       <!-- search advanced form - begin -->

       <div id="buildAdvancedSearch">

        

          <!-- ## Build the search Args ## -->

          <xsl:call-template name="advSearchArgs"/>

     

          <!-- year label, radio button & selection box -->

          <xsl:for-each select="/page:page//page:element[@nameId='yearOption']">

           

             <div id="searchAdvancedInputs">

                <label for=""><xsl:value-of select="/page:page//page:element[@nameId='page.search.advanced.year.selection.label']/page:label" /></label>

                <span>

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

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

                      <xsl:with-param name="optName"   select="'defined'"/>

                      <xsl:with-param name="cssClass"  select="'searchAdvancedYearMargin'"/>

                   </xsl:call-template>

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

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

                      <xsl:with-param name="cssClass"  select="'searchAdvancedToMargin'"/>

                   </xsl:call-template>

                </span>

             </div>

     

             <div id="searchAdvancedInputs">

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

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

                   <xsl:with-param name="optName"   select="'range'"/>

                   <xsl:with-param name="cssClass"  select="'searchAdvancedBlankMargin'"/>

                </xsl:call-template>

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

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

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

                   <xsl:with-param name="cssClass"  select="'searchAdvancedToMargin'"/>

                   </xsl:call-template>

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

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

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

                   <xsl:with-param name="cssClass"  select="'searchAdvancedToMargin'"/>

                </xsl:call-template>

             </div>

              

          </xsl:for-each>

     

     

          <!-- location line -->

          <xsl:for-each select="/page:page//page:element[@nameId='location']">

             <div class="limitDiv">

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

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

                   <xsl:with-param name="cssClass"  select="'searchAdvancedLocationMargin'"/>

                </xsl:call-template>

             </div>

            </xsl:for-each>

             

          <!-- place line -->

          <xsl:for-each select="/page:page//page:element[@nameId='place']">

             <div class="limitDiv">

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

                   <xsl:with-param name="limitType"  select="'place'"/>

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

                   <xsl:with-param name="limitData"  select="$Limits"/>

                   <xsl:with-param name="cssClass"  select="'searchAdvancedPlaceMargin'"/>

                </xsl:call-template>

             </div>

          </xsl:for-each>

             

          <!-- material type line -->

          <xsl:for-each select="/page:page//page:element[@nameId='type']">

             <div class="limitDiv">

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

                   <xsl:with-param name="limitType"  select="'type'"/>

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

                   <xsl:with-param name="limitData"  select="$Limits"/>

                   <xsl:with-param name="cssClass"  select="'searchAdvancedMaterialMargin'"/>

                </xsl:call-template>

             </div>

          </xsl:for-each>

           

          <!-- ## Status ## -->

          <xsl:for-each select="/page:page//page:element[@nameId='status']">

             <div class="limitDiv">

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

                   <xsl:with-param name="limitType"  select="'status'"/>

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

                   <xsl:with-param name="limitData"  select="$Limits"/>

                   <xsl:with-param name="cssClass"  select="'searchAdvancedStatusMargin'"/>

                </xsl:call-template>

             </div>

          </xsl:for-each>

           

          <!-- format line -->

          <xsl:for-each select="/page:page//page:element[@nameId='medium']">

             <div class="limitDiv">

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

                   <xsl:with-param name="limitType"  select="'medium'"/>

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

                   <xsl:with-param name="limitData"  select="$Limits"/>

                   <xsl:with-param name="cssClass"  select="'searchAdvancedFormatMargin'"/>

                </xsl:call-template>

             </div>

          </xsl:for-each>

           

          <!-- language line -->

          <xsl:for-each select="/page:page//page:element[@nameId='language']">

             <div class="limitDiv">

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

                   <xsl:with-param name="limitType"  select="'language'"/>

                   <xsl:with-param name="limitData"  select="$Limits"/>

                   <xsl:with-param name="cssClass"  select="'searchAdvancedLanguageMargin'"/>

                </xsl:call-template>

             </div>

          </xsl:for-each>

     

          <xsl:call-template name="buildSearchButtons"/>

     

       </div>

       <!-- search advanced form - end -->

    </xsl:template>

     

     <!-- ################################################################################ -->

    To This:

    <!-- ##################### -->

     <!-- ## buildSearchForm ## -->

     <!-- ################################################################################ -->

     

    <xsl:template name="buildAdvancedSearch">

     

       <!-- search advanced form - begin -->

       <div id="buildAdvancedSearch">

        

          <!-- ## Build the search Args ## -->

          <xsl:call-template name="advSearchArgs"/>

           <xsl:call-template name="buildSearchButtons"/>

        </div>

       <!-- search advanced form - end -->

    </xsl:template>

     

     <!-- ################################################################################ -->

    Removing Specific Limits from the Limits Listing

    To remove specific limits from any of the limit categories, you need to edit the:

    /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/SKIN/xsl/userTextConfigs/limits.xml

    file and comment out those limits you want to exclude from the display using the

    <!--

    and

    -->

    convention for commenting code. For example:

    <limitGroup type="medium" label="Format:">

                            <limit code="all" default="Y">All Formats</limit>   

                            <limit code="c">Computer File</limit>

                            <limit code="k">Photos, Drawings, etc</limit>

                            <limit code="g">Slides</limit>

                            <limit code="s">Sound Recording</limit>

                            <limit code="v">Videorecording</limit>                       

                            <limit code="h">Microform</limit>

                            <limit code="m">Motion Picture</limit>

                            <limit code="t">Text (Eye-Readable)</limit>

    <!--

                            <limit code="d">Globe</limit>

                            <limit code="a">Map</limit>

    -->

                </limitGroup>

    Remember to comment your changes.




    • Was this article helpful?
    //Feedback