Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
hi all,
i'm trying to sort my list of movies in a specific order. my movie list is from source #1 ($MovieList), while loop thru that list to display its data, i need to sort its movie_id by source #2 ($MovieSort)...
<xsl:for-each select="$MovieList/Movie"> <xsl:sort data-type="number" select="count($MovieSort [movie_id[1]=current()/ID])" order="descending"/> <xsl:sort data-type="number" select="count($MovieSort [movie_id[2]=current()/ID])" order="descending"/> <xsl:sort data-type="number" select="count($MovieSort [movie_id[3]=current()/ID])" order="descending"/>
.....and so on
[[<xsl:value-of select="current()/ID"/>]]
</xsl:for-each>
the number of <xsl:sort.../> were fine until i hit up to move_id[13], that's when it blows up. i guess it's the limitation of Umbraco XSL ?
is there a better way to do this ? please help.
thanks in advance!
Hi bev0,
Could you show some of your XML (Movie nodes and the $MovieSort nodeset), and an example of the order you're trying to render them in?
Are you trying to "shoot" some specific Movie elements to the top of the list?
/Chriztian
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
how to get around multiple <xsl:sort../> due limitation ?
hi all,
i'm trying to sort my list of movies in a specific order. my movie list is from source #1 ($MovieList), while loop thru that list to display its data, i need to sort its movie_id by source #2 ($MovieSort)...
<xsl:for-each select="$MovieList/Movie">
<xsl:sort data-type="number" select="count($MovieSort [movie_id[1]=current()/ID])" order="descending"/>
<xsl:sort data-type="number" select="count($MovieSort [movie_id[2]=current()/ID])" order="descending"/>
<xsl:sort data-type="number" select="count($MovieSort [movie_id[3]=current()/ID])" order="descending"/>
.....and so on
[[<xsl:value-of select="current()/ID"/>]]
</xsl:for-each>
the number of <xsl:sort.../> were fine until i hit up to move_id[13], that's when it blows up. i guess it's the limitation of Umbraco XSL ?
is there a better way to do this ? please help.
thanks in advance!
Hi bev0,
Could you show some of your XML (Movie nodes and the $MovieSort nodeset), and an example of the order you're trying to render them in?
Are you trying to "shoot" some specific Movie elements to the top of the list?
/Chriztian
is working on a reply...