Copied to clipboard

Flag this post as spam?

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


  • misterp 5 posts 21 karma points
    Jun 14, 2009 @ 02:26
    misterp
    1

    xsl:sort from url parameters

    Hi all

    This is my first attempt at using Umbraco, and I have run into a problem I can't figure out how to solve.

    I'm working on a closed intranet-site for a customer, and have created a xslt-file to display the contents of a media-folder. The xslt renders the folder as an Explorer-like interface with icons and titles, and the users can then switch to list-view with additional info about size and filetype by clicking a topbar-button.

    The filenames are fetched by calling , the file-size is fetched by KB and the filetype is fetched by getting the fileending with

  • Finn 86 posts 50 karma points
    Jun 14, 2009 @ 12:05
    Finn
    -1

    Hi Lars

    I would take another approach.

    After your “For each” statement put in the choose statement with the full sort-order line:

  • misterp 5 posts 21 karma points
    Jun 14, 2009 @ 14:17
    misterp
    0

    Hi Finn

    Thanks for the suggestion. That approach was, however, the very first thing I tried, but the xslt-validator refuses to add an xsl:sort within an xsl:choose. My only other option, as I see it, is to use the xsl:choose to generate a variable I can pass on to the xsl:sort, hence my question.

    It appears that the string from the variable is passed ok, but for some reason it doesn't work. I don't know if the special characters in the string are passed encoded by something, maybe? If they are passed "as is", they should work, but they don't.

    I've tried adding a similar variable to sortorder, and here it works perfect. I include it with
    [code][/code]

    /Lars

  • 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