|
LotsOCds wrote:
Hi Cengiz,
Try the following changes to your code. The column label will sort on the track rating in descending order. Remove the '-d' if you would rather it sorts in ascending order.
<TD CLASS="tablerecordsheadingcell" ALIGN="RIGHT"><A HREF="orderby=Length,Title">Length</A></TD> <TD CLASS="tablerecordsheadingcell" ALIGN="RIGHT"><A HREF="orderby=trackrating-d,Title">Rating</A></TD> <TD CLASS="tablerecordsheadingcell"><A HREF="orderby=Album.Title,Track.Title">Album</A></TD>
This will display the text of the track rating in the list.
<TD CLASS="tablerecordscell" ALIGN="RIGHT" WIDTH="5%"> <xsl:value-of select="length"/> </TD> <TD CLASS="tablerecordscell" ALIGN="RIGHT" WIDTH="5%"> <xsl:value-of select="trackrating"/> </TD> <TD CLASS="tablerecordscell" WIDTH="30%"> <!-- Album --> <A HREF="Album.xsl?ID={../albumdata/albumid}"><xsl:value-of select="../albumdata/title"/></A> </TD>
Use this code instead if you would rather display the stars instead of the text.
<TD CLASS="tablerecordscell" ALIGN="RIGHT" WIDTH="5%"> <xsl:value-of select="length"/> </TD> <TD CLASS="tablerecordscell" ALIGN="RIGHT" WIDTH="5%"> <xsl:call-template name="format-trackrating"> <xsl:with-param name="rating" select="trackrating"/> </xsl:call-template> </TD> <TD CLASS="tablerecordscell" WIDTH="30%"> <!-- Album --> <A HREF="Album.xsl?ID={../albumdata/albumid}"><xsl:value-of select="../albumdata/title"/></A> </TD>
You may need to adjust the cell WIDTH parameter so everything looks right on your screen. Hope that helps you.
Cheers, Dave
|