Skip to main content
ExLibris

Knowledge Assistant

BETA
 
  • Subscribe by RSS
  • Back
    Voyager

     

    Ex Libris Knowledge Center
    1. Search site
      Go back to previous article
      1. Sign in
        • Sign in
        • Forgot password
    1. Home
    2. Voyager
    3. Community Knowledge
    4. OPAC: Display Icons Based on Location

    OPAC: Display Icons Based on Location

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    No headers
    Created By: Andy Taylor
    Created on: 5/14/2019



    [This article was copied from the Voyager Wiki.]

    You can use different icons for search results based on location rather than bib format. For example, we wanted to use a different icon for our ebooks but the bib format is not unique. Our library's ebooks have a location of "Electronic Books" so we can use javascript to change the icon based on that.

    First, upload your new icon into ui/YOURSKIN/images/bibFormat/

    Second, add these lines to ui/YOURSKIN/xsl/pageTools/frameWork.xsl above the </head> tag

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"/>
    <script type="text/javascript" src="{$jscript-loc}local.js"/>

    The first line includes the jquery library that is hosted by google. Create ui/YOURSKIN/jscripts/local.js and include the following

    function setEbookIcons() {
            $("div.line5Link:contains('Electronic Book')")
                    .parent().parent()
                    .siblings(".resultListIcon")
                    .children("img").attr("src","ui/YOURSKIN/images/bibFormat/icon_www.gif");
    }
    
     
    $(document).ready(function() {
            setEbookIcons();
    });

    Simply change 'Electronic Book' to the location text you want to match against and 'icon_www.gif' to the name of your icon image.

    Note: this works with version 7.1.0 . It may work with other Tomcat OPAC versions if the markup hasn't changed but I haven't tested.




    Report
    View article in the Exlibris Knowledge Center
    1. Back to top
      • OPAC: Disable Quick Limits from Basic Search
      • OPAC: Enhancing the New Search Box in the Quick Search Bar
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Community Content Type
      Enhancements
      Language
      English
      Product
      Voyager
    2. Tags
      This page has no tags.
    1. © Copyright 2025 Ex Libris Knowledge Center
    2. Powered by CXone Expert ®
    • Term of Use
    • Privacy Policy
    • Contact Us
    2025 Ex Libris. All rights reserved