Copied to clipboard

Flag this post as spam?

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


  • Barry 15 posts 94 karma points
    Jul 12, 2011 @ 14:37
    Barry
    0

    Custom Sort Order for the Pages list

    I am trying to implement a custom sort order for the Pages list and I have done the following:

    Modifed to the Blog TestPage document type to include a Generic Property called customSortOrder. I have then populated this property on each page with a value e.g. 1, 2, 3, 4 etc

    I now want to amend the BlogPages.xslt so that it sorts the Pages <ul> in the order of my customSortOrder property. However, I don't seem to be able to access the generic property. I added a sort element to the XSLT but it doesn't do anything:

      <xsl:for-each select="$parent/blogTextPage [string(./umbracoNaviHide) != '1']"
       <xsl:sort select="./customSortOrder" order="ascending"/>

    This is the first time I have used XSLT and Umbraco so forgive me if this is a really simple error on my part!

    Thanks!

    Barry

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Jul 12, 2011 @ 14:40
    Tim Geyssens
    0

    Hey Barry,

    And can you output the customSortOrder ?

    simply with an <xsl:value-of select="./customSortOrder" /> inside your for each loop

  • Barry 15 posts 94 karma points
    Jul 12, 2011 @ 14:44
    Barry
    0

    It doesn't produce any output - which leads me to believe I'm not actually selecting the property at all.

  • Barry 15 posts 94 karma points
    Jul 12, 2011 @ 15:29
    Barry
    0

    Well this is strange. I went through each page and updated the Custom Property again and re-published each page and now it is working fine.

    Sorry to waste your time.

     

  • 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.

Please Sign in or register to post replies