Hi Wayne, Check out the jquery pagination on this page;
http://www.masterchef.com.au/episodes.htm It works from a single list object and is flexible with the options available. You can even call the Google url for jquery. Cheers, BjP On Aug 28, 12:02 am, ArryD <[email protected]> wrote: > Hi Wayne > > Ive achieved this using the JQuery pagination plugin and a list > element. Basically the idea is use the list and some script to write > out the div classes that the JQuery script will then process. Once the > script has written the out HTML the JQuery script takes over and > produces the pagination. The end result is nice as its Ajax based. > > Cheers - Aaron > > On Aug 27, 3:23 am, kimdezen <[email protected]> wrote: > > > > > Hey Wayne, > > > I came across this code on the reddotcommunity.com site. Works well > > when you need simple pagination for a list in SmartEdit mode only. > > > Cheers, > > Kim > > > <!--RDExecute=asp--> > > <% > > 'specify number of list items per page > > iItemsPerPage = 20 > > > 'Count total list items using CMS List > > iTotalItems = 0 > > <!IoRangeList>iTotalItems = iTotalItems + 1 '<%List%> > > <!/IoRangeList> > > > 'calculate number of pages > > If iTotalItems mod iItemsPerPage = 0 Then > > iNumPages = iTotalItems / iItemsPerPage > > Else > > iNumPages = Int(iTotalItems / iItemsPerPage) + 1 > > End If > > > 'Which page to display currently? > > If Request("listpage") = "" Then > > iDisplayPage = 1 > > Else > > iDisplayPage = CInt(Request("listpage")) > > End If > > > 'Which item to end with? > > iEndItem = iDisplayPage * iItemsPerPage > > > 'Which item to start with? > > iStartItem = iEndItem - iItemsPerPage + 1 > > > 'Counter for displaying items > > iCounter = 0 > > %> > > <ol start="<%=iStartItem%>"> > > <!IoRangeList><% > > iCounter = iCounter + 1 > > 'Display List Item (if it is in range). DISPLAY ALL ITEMS IN EDIT > > MODE. > > If iCounter >= iStartItem AND iCounter <= iEndItem <! > > IoRangeRedDotEditOnly> OR True<!/IoRangeRedDotEditOnly> Then > > %><li><%List%></li><% > > End If > > %> > > <!/IoRangeList> > > </ol> > > <p><% > > 'HERE WE SHOW PREVIOUS AND NEXT LINKS > > <!IoRangeRedDotEditOnly> > > 'THIS IS SECTION NOT SHOWN IN EDIT MODE > > If False Then > > <!/IoRangeRedDotEditOnly> > > > 'Display current page no. > > Response.Write "Page " & iDisplayPage & " of " & iNumPages & > > " " > > > 'Display previous link > > If iDisplayPage > 1 Then > > Response.Write "<a href=""" & Request.ServerVariables > > ("SCRIPT_NAME") & "?listpage=" & (iDisplayPage - 1) & """>Previous</a> > > | " > > Else > > Response.Write "Previous | " > > End If > > > 'Display next link > > If iDisplayPage < iNumPages then > > Response.Write "<a href=""" & Request.ServerVariables > > ("SCRIPT_NAME") & "?listpage=" & (iDisplayPage + 1) & """>Next</a>" > > Else > > Response.Write "Next" > > End If > > <!IoRangeRedDotEditOnly>End If<!/IoRangeRedDotEditOnly> > > %> > > </p> > > > On Aug 27, 1:14 am, Wayne Bouwmeester <[email protected]> > > wrote: > > > > Has anyone worked out a slick solution that can do simple pagination > > > just within CMS? > > > > Basically I have a list of about 200 items (pages), ordered A to Z, > > > and I want to show some summary details of them 10 at a time (with a > > > link to the full details page) and use a "Page 1 2 3 4 ...20." type > > > navigation to move between the paginated index page(s). > > > The list can grow and shrink, and reorder as new items are added/ > > > inserted and removed. > > > Target containers gets me near to where I want to go, but not really, > > > and I normally avoid them like the plague. > > > > Yes, this can easily be done in Delivery Server (overkill for the rest > > > of this project) and can be done with .net or classic asp on IIS, but > > > I'm looking for a simple solution that can be used over a few projects > > > with different application servers. (read works the same for a client > > > on cold fusion, .net, or classic asp because its just CMS) > > > > I'll likely just write a plugin to automate it, but am interested if > > > anyone has already thought about it. > > > > Cheers! > > > Wayne. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/reddot-cms-users?hl=en -~----------~----~----~----~------~----~------~--~---
