Copied to clipboard

Flag this post as spam?

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


  • Jonas Høiby 30 posts 20 karma points
    Jun 11, 2009 @ 14:05
    Jonas Høiby
    0

    XSLT counter without using position ..

    Any idea on howto do this?

    I want to make a counter that counts 5 newsfeeds from the last 5 created sub-pages to a page ..

    problem is - i cant use position because of the xsl:if that makes sure that unwanted pages doesnt end up in the same feed..

    any help would be appreciated .. :-)

  • Jonas Høiby 30 posts 20 karma points
    Jun 11, 2009 @ 14:06
    Jonas Høiby
    0

    [code]










    [/code]

    tried this .. and theres a page created later than the one showing .. so position says 2 instead of 1 .. so .. thats why i wanted to make a counter instead .. :-)

  • Tommy Poulsen 514 posts 708 karma points
    Jun 11, 2009 @ 14:21
    Tommy Poulsen
    0

    Jonas, you can probably get by with position() anyway, but instead of using your if-statement, move the clause to the for-each

    So instead of:
    [code]

    Tommy

  • Tommy Poulsen 514 posts 708 karma points
    Jun 11, 2009 @ 14:53
    Tommy Poulsen
    0

    ooops, sorry, did not read you code correctly.

    Here is what you could write :

    [code]

    Tommy


  • Jonas Høiby 30 posts 20 karma points
    Jun 11, 2009 @ 15:13
    Jonas Høiby
    0

    nice thanks - ill try it .. :)

  • 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