Copied to clipboard

Flag this post as spam?

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


  • shufflemoomin 37 posts 36 karma points
    Apr 16, 2009 @ 18:53
    shufflemoomin
    0

    Paged list?

    Hi everyone,

    I have a simple requirement that I can't figure out with XLST. I have an variable number of nodes. I want to loop through them the pull out a picture and title and show them in a list. I can do that part, but I can't work out how to split it up into pages. I want to show the first 6 nodes, then have a button to show the next 6 or the last 6.

    Has anyone done anything similar with XSLT and give me some pointers on how to achieve this?

    Many thanks to anyone who can offer help.
    Shufflemoomin

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Apr 16, 2009 @ 19:40
    Dirk De Grave
    0

    Hi

    Perform a search on nibble.be for paging, you'll find some examples on how to use paging in xslt.

    Regards,
    /Dirk

  • Evan 344 posts 99 karma points
    Apr 16, 2009 @ 21:14
    Evan
    0

    [quote=shufflemoomin]Hi everyone,

    I have a simple requirement that I can't figure out with XLST. I have an variable number of nodes. I want to loop through them the pull out a picture and title and show them in a list. I can do that part, but I can't work out how to split it up into pages. I want to show the first 6 nodes, then have a button to show the next 6 or the last 6.

    Has anyone done anything similar with XSLT and give me some pointers on how to achieve this?

    Many thanks to anyone who can offer help.
    Shufflemoomin[/quote]

    Here is how I did this with a news letter section I am working on for a site.

    [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" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
    exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">


















    [/code]

    As you can see I am showing 9 per page but you can manipulate it to 6 with no worries

  • Jesper Hauge 298 posts 487 karma points c-trib
    Apr 17, 2009 @ 00:46
    Jesper Hauge
    0

    I know it's not what you asked for, but as you see from the posts here, paging in xslt can be rather cumbersome.
    If your layout permits putting your data in a table paging can be done with a jquery plugin and one line of javascript code on the page with this:

    http://www.slashjquery.com/tablepager/index.html

    Regards
    Jesper Hauge

  • shufflemoomin 37 posts 36 karma points
    Apr 17, 2009 @ 10:07
    shufflemoomin
    0

    Thank you all for the quick replies. I'll take a look at the information provided later today. Thank you jHauge, that's an interesting little script there.

Please Sign in or register to post replies

Write your reply to:

Draft