Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter S 169 posts 587 karma points
    Jun 04, 2010 @ 08:58
    Peter S
    0

    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>
  • Tom Maton 387 posts 660 karma points
    Jun 04, 2010 @ 09:33
    Tom Maton
    0

    Hi Peter,

    try changing

    @pageSortOrder

    to

    @sortOrder

    The reason in because there is no @pageSortOrder value but there is a @sortOrder

    Tom

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jun 04, 2010 @ 09:51
    Matt Brailsford
    1

    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

Please Sign in or register to post replies

Write your reply to:

Draft