[albatross-users] pagination with al-for

Michael C. Neel neel at mediapulse.com
Thu Jan 1 03:25:04 EST 2004


This has come up a few times here as well.  The iterator class used
doesn't have the methods needed for this.  We have talked about how we
could add firstpage, lastpage, and gotopage methods into the class.

I would have had this in my Axe extensions already, but it's not as
simple as adding an alx-for tag.  You would also have to do an
alx-input, alx-img, and alx-a tag for the attributes to work.  That's
getting messy.  It would be better to patch albatross to put in this
support natively.

It does highlight a design issue in albatross as well, since any other
additions of this nature would also affect several tags.  We have talked
about instead of using custom attributes for each method, i.e.
nextpage="i", there would be a generic attribute "action", which could
work like action="i.nextpage()" - which would allow custom tags an
eassier time of adding features along these lines.

Adding this is next on my list, just awaiting a response on the last
patch I sent in (I don't want to get into a version nightmare of pending
patches, lol).   Actually, since we have standarized development on
Albatross we have talked about going with our own "fork" of the project
adding this and other items mentioned on the Wiki like added macro
features.  Because we've standarized on it, I can put development time
to it, and of cource would make all our changes available.  I do have a
concern with this though, I don't want to "fragment" the project.  I'd
have to do it with the catch that if the OC guys added a feature to
albatross that I'd drop it from the fork and use the albatross version -
even if it broke backwards compatibilty within the fork.  We already are
setup to have each site with it's own albatross copy, so new version
don't break old sites (*cough* files *cough*), so this is okay for us.

I'm open to all thoughts on this, good and bad.

Mike

> -----Original Message-----
> From: Sheila King [mailto:sheila at thinkspot.net] 
> Sent: Wednesday, December 31, 2003 3:15 AM
> To: albatross-users at object-craft.com.au
> Subject: [albatross-users] pagination with al-for
> 
> 
> Hello,
> 
> I've set up a portion of my app that displays some log results with
> pagination (assuming that there are more log entries than the 
> page size
> I've set).
> 
> It wasn't too hard to get the prevpage/nextpage links 
> working, so that I
> can page forward or backward through the entire sequence display.
> 
> However, I like to be able to jump directly to a particular page.
> 
> For example, if pagesize is 6, and there are 26 entries, and 
> thus 5 pages...
> 
> How would I best display a list of page numbers so that I can click
> directly on a given page number and go to that list of six items?
> 
> I started to think maybe I need to go to trees for this? 
> 
> Well, hoping for tips or suggestions.
> 
> Thanks,
> 
> -- 
> Sheila King
> http://www.thinkspot.net/sheila/
> http://www.k12groups.org
> 
> _______________________________________________
> Albatross-users mailing list
> Albatross-users at object-craft.com.au
> https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albat
ross-users



More information about the Albatross-users mailing list