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:
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:
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
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.
Hi,
Have a look at http://www.nibble.be/?p=11 to see if that fits your needs.
Regards,
/Dirk
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:
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
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 |
I have managed to resolve the issue by changing the following:
is working on a reply...