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
Is there something wrong with this? I would expect the page to sort by the value given to them but they don't.
<xsl:for-each select="$currentPage/ancestor-or-self::node [@level=$level]/node [string(data [@alias='umbracoNaviHide']) != '1']"> <xsl:sort select="@pageSortOrder" order="ascending" data-type="number" /> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </li> </xsl:for-each>
Hi Peter,
try changing
@pageSortOrder
to
@sortOrder
The reason in because there is no @pageSortOrder value but there is a @sortOrder
Tom
Just on a side note, if you are sorting by the @sortOrder ascending, you shouldn't actualy need the sort at all, as the nodes should already be presented in that order.
Matt
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Sort order on property won't work
Is there something wrong with this? I would expect the page to sort by the value given to them but they don't.
<xsl:for-each select="$currentPage/ancestor-or-self::node [@level=$level]/node [string(data [@alias='umbracoNaviHide']) != '1']"> <xsl:sort select="@pageSortOrder" order="ascending" data-type="number" /> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </li> </xsl:for-each>
Hi Peter,
try changing
@pageSortOrder
to
@sortOrder
The reason in because there is no @pageSortOrder value but there is a @sortOrder
Tom
Hi Peter,
Just on a side note, if you are sorting by the @sortOrder ascending, you shouldn't actualy need the sort at all, as the nodes should already be presented in that order.
Matt
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.