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: New Books RSS Feed Embedded in Search Page

    OPAC: New Books RSS Feed Embedded in Search Page

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    1. Description
    2. Installation Instructions
    3. Michael Doran's New Books program must be installed and working to use this script.
    4. TO DO list
    5. Known issues
    6. Comments
    7. Added by Jim Robinson on Apr 03, 2009 20:19, last edited by Jim Robinson on May 11, 2009 17:06(Detailed page information)
    Created By: Jim Robinson
    Created on: 5/14/2019



    [This article was copied from the Voyager Wiki.]

    Description

    A perl script generates an RSS feed for a limited number of new books from Michael Doran's New Books program and embedded in a WebVoyage 7 search page.

    Additional Author: Michael Doran

    Downoad at https://library.tccd.edu/code/webvoyage/new_books_subjects.php

    A Full RSS Feeder is also available. Just remember to set up the configuration at the top of the script.

    The RSS Feed can be seen in the lower right corner of our Basic Search page.

    Our Full RSS Feed is also available. It contains 1 week of new books sorted by title.

    Installation Instructions

    Michael Doran's New Books program must be installed and working to use this script.

    1. Edit new_books_mini.cgi between Configuration and End Configuration. Required items include:

    • Your library domain
    • The number of books you want to appear in your RSS feed.
    • The number of books desired from each location
    • The number of weeks to go back looking for books (usually between 1 and 4)
    • The name of your RSS feed
    • A brief description of your RSS feed
    • The names of desired locations as found in newBooks.txt
    • If desired, image information for your RSS feed

    2. Upload new_books_mini.cgi to /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/htdocs/vwebv/new_books_mini.cgi, which is where your newBooks.cgi script should be located.

    3. Set the permissions to 755 (rwxr-xr-x)

    4. Open Firefox and test the http://your.library.domain/vwebv/new_books_mini.cgi (be sure to change your.library.domain to your library domain)

    5. Back up /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/xsl/pageTools/tools.xsl

    6. In tools.xsl, find

    <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />

        and add the following lines underneath it (be sure to change your.library.domain to your library domain):

    <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />

    <xsl:variable name="NewBooks" select="document('http://your.library.domain/vwebv/new_books_mini.cgi')"/>

    <xsl:variable name="new_books" select="$NewBooks/rss/channel"/>

    7. In tools.xsl, find

    <xsl:if test="$Configs/pageConfigs/pageHTML/page\[@name=$pageNameId\]\[@position=$position\]">

       <div class="pageHTMLSnippet">

          <xsl:copy-of select="$Configs/pageConfigs/pageHTML/page\[@name=$pageNameId\]\[@position=$position\]/node()"/>

       </div>

    </xsl:if>

        and change it to look like this (without the line numbers, of course):

    01 <xsl:if test="$Configs/pageConfigs/pageHTML/page\[@name=$pageNameId\]\[@position=$position\]">

    02    <div class="pageHTMLSnippet">

    03       <xsl:copy-of select="$Configs/pageConfigs/pageHTML/page\[@name=$pageNameId\]\[@position=$position\]/node()"/>

    04    </div>

    05

    06    <xsl:if test="$pageNameId='page.searchBasic'">

    07       <div id="new_books">

    08          <ul>

    09             <xsl:for-each select="$new_books/item">

    10                <li>

    11                   <xsl:attribute name="class"><xsl:value-of select="description"/></xsl:attribute>

    12                   <a>

    13                      <xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>

    14                      <xsl:attribute name="title"><xsl:value-of select="description"/></xsl:attribute>

    15                      <xsl:value-of select="title"/>

    16                   </a>

    17                </li>

    18             </xsl:for-each>

    19          </ul>

    20       </div>

    21    </xsl:if>

    22 </xsl:if>

    8. Edit the appropriate stylesheets (e.g., searchBasic.css). See tips below for stylesheet hints.

    Check

    Line 6 and line 21 are used to display the feed only on the Basic Search page.

    Check 

    The class is the location (which is the description). If you have multiple words in your locations, then you have multiple classes with which to work. Choose a common class name to display common features and unique class names to differentiate. For example, our locations are "Northeast Library Circulating Collection", "Northwest Library Circulating Collection", etc. In our stylesheet, .Northeast and .Northwest have different colors, while .Circulating has a common padding.

     

    Check

    Because our feed only appears in the Basic Search, my CSS markup only appears in searchBasic.css.
    I have a separate CSS page for newBooks.cgi in which I have
    #new_books { display:none;}
    so that the feed doesn't appear on the newBooks.cgi page, which uses the Basic Search page as a "template".

    Check

    Remember to change items in bold italics to your institution information

     

    Check

    Download and install Firefox with Firebug

    TO DO list

    None

    Known issues

    None


    Comments

    None

    Added by Jim Robinson on Apr 03, 2009 20:19, last edited by Jim Robinson on May 11, 2009 17:06(Detailed page information)

     

    IGeLU - ELUNA
    Terms of Use | Privacy Policy | Contact

    New Books RSS Feed Code

     




    Report
    View article in the Exlibris Knowledge Center
    1. Back to top
      • OPAC: List of Voyager Sites Implementing External Patron Authentication
      • OPAC: Redirect Classic WebVoyage Persistent Links to Tomcat WebVoyage
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Community Content Type
      How To
      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