New Books RSS Feed In WebVoyage SearchBasic Page

A tutorial on how to include external XML files in your WebVoyage pages. This example will add a small RSS feed to searchBasic.

  1. This example requires Michael Doran's New Books program.
  2. Download the mini RSS feed.
  3. Edit new_books_mini.cgi in the Configuration area near the top of the script. You will need to change:
  4. 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.
  5. Set the permissions to 755 (rwxr-xr-x)
  6. Open Firefox and test your RSS feed: http://your.library.domain/vwebv/new_books_mini.cgi (be sure to change your.library.domain to your library domain)
  7. Back up /m1/voyager/{xxxdb}/tomcat/vwebv/context/vwebv/ui/{skin}/xsl/pageTools/tools.xsl
  8. In tools.xsl, find <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" /> and add lines underneath it:

    <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"/>
  9. 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:
    <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 test="$pageNameId='page.searchBasic'">
           <div id="new_books">
              <ul>
                 <xsl:for-each select="$new_books/item">
                    <li>
                       <xsl:attribute name="class"><xsl:value-of select="description"/></xsl:attribute>
                       <a>
                          <xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>
                          <xsl:attribute name="title"><xsl:value-of select="description"/></xsl:attribute>>
                          <xsl:value-of select="title"/>
                       </a>
                    </li>
                 </xsl:for-each>
              </ul>
           </div>
        </xsl:if>
     </xsl:if>
    				
  10. Edit searchBasic.css to style your changes.