Copied to clipboard

Flag this post as spam?

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


  • trfletch 598 posts 604 karma points
    Feb 25, 2009 @ 17:54
    trfletch
    0

    Showing maximum number of items on a page

    I currently have a news list setup which works fine but what I would like is it only to display a maximum number of items per page (i.e. 10) and then create over pages to show the rest with something like this shown enabling people to view the rest of the results:

    52 results found in 6 pages | First « 1 2 3 4 5 » Last

    Does anyone know how this can be achieved? Currently I have the following code:




    Thanks in advance for any help.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Feb 25, 2009 @ 20:00
    Dirk De Grave
    0

    Hi,

    Have a look at http://www.nibble.be/?p=11 to see if that fits your needs.

    Regards,
    /Dirk

  • trfletch 598 posts 604 karma points
    Feb 26, 2009 @ 16:26
    trfletch
    0

    Thank you for this, I have ended up using the code from:

    http://forum.umbraco.org/yafpostsm38185Flexible-XSLT-Paging-and-Sorting-Example.aspx#38185

    And I am just trying to modify it so that it display what I want where I want it, one of the problems I have come across is the part where it counts the nodes so that it can show how many were found. Because the code used in the above link is showing news items by showing all child nodes it uses this:



    But to get the items I want I use the following code:

  • trfletch 598 posts 604 karma points
    Feb 26, 2009 @ 18:29
    trfletch
    0

    Ok well I have answered my own question now and found the following code works:



    The problem I now have is the number of pages, not too sure what I have to change in my code so that it works out how many pages there are. The actual code works in the sense that I can scroll through to different pages using the next and previous links but it is not showing the number of pages in between! For example I get

  • trfletch 598 posts 604 karma points
    Feb 26, 2009 @ 19:19
    trfletch
    0

    If it helps this is the code I currently have:


    ]>
    <>
    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.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes"
    exclude-result-prefixes="msxml umbraco.library">







































    results found in pages |
















    results found in pages |














  • trfletch 598 posts 604 karma points
    Feb 27, 2009 @ 18:46
    trfletch
    0

    I have managed to resolve the issue by changing the following:

Please Sign in or register to post replies

Write your reply to:

Draft