Copied to clipboard

Flag this post as spam?

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


  • Paul Hulatt 47 posts 59 karma points
    Mar 09, 2009 @ 10:11
    Paul Hulatt
    0

    Newslist with Archive

    I have setup the following folder structure for news:

    --News
    | |--Archive
    | |--2008
    | | |--Nov
    | | | |--Article 1
    | | | |--Article 2
    | | |--Dec
    | | | |--Article 3
    | | | |--Article 4
    | |--2009
    | | |--Jan
    | | | |--Article 5
    | | | |--Article 6
    |--Article 7
    |--Article 8

    Now, for my news page I want to get the articles in descending sort order:

    Article 8
    Article 7
    Article 6
    Article 5
    Article 4
    ...

    But I actually get something more like this:

    Article 8
    Article 6
    Article 4
    Article 2
    Article 7
    Article 5
    Article 3
    Article 1

    I'm sure I'm missing something simple but how can I achieve what I am looking for in XSLT with a single for-each or do I need to nest them?

    Thanks

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 09, 2009 @ 11:12
    Dirk De Grave
    0

    Hi,

    Care to show the current xslt?

    Regards,
    /Dirk

  • Paul Hulatt 47 posts 59 karma points
    Mar 10, 2009 @ 12:37
    Paul Hulatt
    0

    Yes, sorry I should have included it originally.

    [code]

  • Paul Hulatt 47 posts 59 karma points
    Mar 23, 2009 @ 17:07
    Paul Hulatt
    0

    Solved with the following code which seems to achieve the desired effect.

    [code]

    ]>

    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library"
    exclude-result-prefixes="msxml umbraco.library">




















    [/code]

  • Mario Allegro 17 posts 35 karma points
    Apr 02, 2009 @ 07:48
    Mario Allegro
    0

    I love you for this solution =d>
    Greets Mario

  • Paul Hulatt 47 posts 59 karma points
    Apr 23, 2009 @ 12:30
    Paul Hulatt
    0

    I'm glad it was of help to someone else.

    I could do with a bit of additional help though. Would anyone be able to shed any light on how to go about adding paging to this code?

    I have the following so far but the trouble is it returns the first 15 stories for each child node too.

    [code]

    ]>

    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library"
    exclude-result-prefixes="msxml umbraco.library">

























    [/code]

    What I really need is someway of keeping an overall count or breaking out when the threshold is reached.

    I'm sure I'm missing something simple so any help would be appreciated.

    Cheers


    Paul

Please Sign in or register to post replies

Write your reply to:

Draft