Thanks for your reply, but that didn't work. I think "ascending" is the default value anyway.
I'm starting to think that this is a bug in umbraco. Because when I use descending, I get the same scrambled order, but reversed. I've tried republishing every node, but without succes.
I think I've figured it out! Here's the result of the sorting:
0 1 10 11 12 2 3 4 5 6 7 8 9
It appears it's sorting it as a string and not as an int. I suck at xslt, so I don't know how I can make it treat sortOrder as an int, will get back when I find it.
Sorting
Hello,
I have the following xslt that spits out some xml:
However, the created items are not in the same order as in the Umbraco Content view.
Am I doing something wrong?
Thanks!
Hi, try something like:
<xsl:sort select="@sortOrder" order="descending"/>
<xsl:sort select="@sortOrder" order="ascending"/>
Rog ;-)
Thanks for your reply, but that didn't work. I think "ascending" is the default value anyway.
I'm starting to think that this is a bug in umbraco. Because when I use descending, I get the same scrambled order, but reversed. I've tried republishing every node, but without succes.
What version of umbraco are you using? There was a bug with really long node names in one of the v3 versions.
cheers,
doug.
v4.0.2.1
I think I've figured it out! Here's the result of the sorting:
0 1 10 11 12 2 3 4 5 6 7 8 9
It appears it's sorting it as a string and not as an int. I suck at xslt, so I don't know how I can make it treat sortOrder as an int, will get back when I find it.
Aaaand found it.
Thanks for the help everyone!
excellent, i'll make a note of that one :-)
is working on a reply...