Due to enormous amounts of spam, the forum has been set to read-only mode.



Reply to topic  [ 3 posts ] 
Adding "Track Rating" Column to TrackList.xsl 
Author Message

Joined: Sun Apr 24, 2005 4:12 pm
Posts: 82
Location: Istanbul - Turkey
Post Adding "Track Rating" Column to TrackList.xsl

Hi Fredrick,
I want to see my personal rating for the tracks on the prewiev pane. How can I add "Track Rating" column to the TrackList.xsl ?
Thanks
Cengiz.

I have tried this but It doesn't work :

<TD CLASS="tablerecordsheadingcell" ALIGN="RIGHT"><A HREF="orderby=Length,Title">Length</A></TD>
<TD CLASS="tablerecordsheadingcell" ALIGN="RIGHT"><A HREF="orderby=rating,Title">Rating</A></TD>
<TD CLASS="tablerecordsheadingcell"><A HREF="orderby=Album.Title,Track.Title">Album</A></TD>

and

<TD CLASS="tablerecordscell" ALIGN="RIGHT" WIDTH="5%">
<xsl:value-of select="length"/>
</TD>
<TD CLASS="tablerecordscell" ALIGN="RIGHT" WIDTH="5%">
<xsl:value-of select="rating"/>
</TD>
<TD CLASS="tablerecordscell" WIDTH="30%">
<!-- Album -->
<A HREF="Album.xsl?ID={../albumdata/albumid}"><xsl:value-of select="../albumdata/title"/></A>
</TD>


Sat Sep 02, 2006 6:53 am
Profile
User avatar

Joined: Fri Nov 14, 2003 6:15 pm
Posts: 1425
Post 

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


Sat Sep 02, 2006 8:10 am
Profile WWW

Joined: Sun Apr 24, 2005 4:12 pm
Posts: 82
Location: Istanbul - Turkey
Post 

Thanks Dave. It's OK now.
Cengiz

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


Sat Sep 02, 2006 8:23 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.