Navigation:  BookCAT FAQ > Upgrading to the latest version > Version 9 > Explorer templates >

Manual update

Previous pageReturn to chapter overviewNext page

If you have customized the explorer templates

Another options is to install the new templates, and then re-apply your customizations to the standard templates (remember to backup your own templates first!).

If you would like to download the new templates and compare them with your existing templates, download bookcat9_xsl.zip.


To automatically display the new rating images in the explorer you have to replace the call to "format-albumrating" and "format-trackrating".

In Book.xsl, BookBrowse.xsl, BookBrowse_Right.xsl, BookList.xsl, BookList_Series.xsl and Person_Credits.xsl replace

<xsl:call-template name="format-personalrating">
<xsl:with-param name="rating" select="personalrating"/>
</xsl:call-template>        

with

<IMG SRC="{personalrating/@image}" BORDER="0"/>

To be able to set the personal rating from the explorer, you must add this code after the code to display the rating image:

<A HREF="CMD:SETRATING:Book,PersonalRating,{bookid/@unformatted}">
<IMG SRC="SetRating.gif" BORDER="0"/>
</A>            

For example in BookBrowse.xsl:

       <!-- Rating -->
       <TR CLASS="fieldrowprevpane">
       <TD CLASS="fieldnameprevpane" NOWRAP="">
         Rating:
       </TD>
       <TD CLASS="fieldvalueprevpane" WIDTH="100%">
         <xsl:if test="personalrating/@image!=''">
           <A HREF="BookList.xsl?PersonalRating={personalrating}@xmltitle={/data/fld/book/personalrating/@name}: {personalrating}" TARGET="_BLANK">
             <IMG SRC="{personalrating/@image}" BORDER="0"/>
           </A>
             <A HREF="CMD:SETRATING:Book,PersonalRating,{bookid/@unformatted}">
               <IMG SRC="SetRating.gif" BORDER="0"/>
             </A>
         </xsl:if>   
       </TD>
     </TR>

In addition, you can delete the "Common-FormatRating.xsl" file, and remove all references ("<xsl:include href="Common-FormatRating.xsl"/>") to this file in the other templates.


You must remove all references to the Category and Sub-Category fields, and instead add code to display the new Genre field.

First, delete these 4 template files: Category.xsl, Category_Browse.xsl, SubCategory.xsl and SubCategory_Browse.xsl.

In Book.xsl, replace this code:

<xsl:if test="category!=''">
<TR CLASS="fieldrow">
<TD CLASS="fieldname" NOWRAP=""><xsl:value-of select="/data/fld/book/category/@name"/></TD>*
<TD CLASS="fieldvalue">
   <A HREF="BookList.xsl?Category={category}@xmltitle={/data/fld/book/category/@name}: {category}">
     <xsl:value-of select="category"/>
   </A>
</TD>
</TR>
</xsl:if>
<xsl:if test="subcategory!=''">
<TR CLASS="fieldrow">
<TD CLASS="fieldname" NOWRAP=""><xsl:value-of select="/data/fld/book/subcategory/@name"/></TD>
<TD CLASS="fieldvalue">
   <A HREF="BookList.xsl?SubCategory={subcategory}@xmltitle={/data/fld/book/subcategory/@name}: {subcategory}">
     <xsl:value-of select="subcategory"/>
   </A>
</TD>
</TR>
</xsl:if>

with

<xsl:if test="count(genrelist/genre)>0">
<TR CLASS="fieldrow">
<TD CLASS="fieldname" NOWRAP=""><xsl:value-of select="/data/fld/book/genre/@name"/></TD>
<TD CLASS="fieldvalue">
   <xsl:call-template name="format-genre">
     <xsl:with-param name="genrelist" select="genrelist"/>
     <xsl:with-param name="newline" select="'False'"/>
     <xsl:with-param name="separator1" select="'; '"/>
     <xsl:with-param name="separator2" select="'; '"/>
   </xsl:call-template>
</TD>
</TR>
</xsl:if>

In BookBrowse.xsl, replace

<!-- Category -->   
<xsl:if test="category!=''">
<TR CLASS="fieldrowprevpane">
<TD CLASS="fieldnameprevpane" NOWRAP="">
<xsl:value-of select="/data/fld/book/category/@name"/>:
</TD>
<TD CLASS="fieldvalueprevpane" WIDTH="100%">
<A HREF="BookList.xsl?Category={category}@xmltitle=Category: {category}" TARGET="_BLANK">
   <xsl:value-of select="category"/>
</A>
<xsl:if test="subcategory!=''">
   <xsl:text> / </xsl:text>
   <A HREF="BookList.xsl?SubCategory={subcategory}@xmltitle=Sub-Category: {subcategory}" TARGET="_BLANK">
     <xsl:value-of select="subcategory"/>
   </A> 
</xsl:if>
</TD>
</TR>
</xsl:if>

with

<!-- Genre -->
<xsl:if test="count(genrelist/genre)>0">
<TR CLASS="fieldrowprevpane">
<TD CLASS="fieldnameprevpane" NOWRAP="">
   <xsl:value-of select="/data/fld/contents/genre/@name"/>:        
</TD>         
<TD CLASS="fieldvalueprevpane" WIDTH="100%">
   <xsl:call-template name="format-genre">
     <xsl:with-param name="genrelist" select="genrelist"/>
     <xsl:with-param name="newwindow" select="'True'"/>
     <xsl:with-param name="newline" select="'False'"/>
     <xsl:with-param name="separator1" select="'; '"/>
     <xsl:with-param name="separator2" select="'; '"/>
   </xsl:call-template>
</TD>
</TR>
</xsl:if>

In BookBrowse_Right.xsl, replace

<!-- Category -->
<xsl:if test="category!=''">  
<TR CLASS="fieldrowprevpane_v">
<TD CLASS="fieldnameprevpane_v" NOWRAP="">
   <xsl:value-of select="/data/fld/book/category/@name"/>:
</TD>
<TD CLASS="fieldvalueprevpane_v" WIDTH="100%">
   <A HREF="BookList.xsl?Category={category}@xmltitle=Category: {category}" TARGET="_BLANK">
     <xsl:value-of select="category"/>
   </A>
   <xsl:if test="subcategory!=''">
     <xsl:text> / </xsl:text>
     <A HREF="BookList.xsl?SubCategory={subcategory}@xmltitle=Sub-Category: {subcategory}" TARGET="_BLANK">
       <xsl:value-of select="subcategory"/>
     </A>
   </xsl:if>
</TD>
</TR>
</xsl:if>

with

<!-- Genre -->
<xsl:if test="count(genrelist/genre)>0">  
<TR CLASS="fieldrowprevpane_v">
<TD CLASS="fieldnameprevpane_v" NOWRAP="">
   <xsl:value-of select="/data/fld/book/genre/@name"/>:
</TD>
<TD CLASS="fieldvalueprevpane_v" WIDTH="100%">
   <xsl:call-template name="format-genre">
     <xsl:with-param name="genrelist" select="genrelist"/>
     <xsl:with-param name="newline" select="'False'"/>
     <xsl:with-param name="separator1" select="'; '"/>
     <xsl:with-param name="separator2" select="'; '"/>
   </xsl:call-template> 
</TD>
</TR>
</xsl:if>


That's it. Contact support@fnprg.com if you have any questions.