On Nov 12, 2006, at 17:08 , Jonathan Barket wrote:
I hate to ask a ridiculous question, but for the life of me I can’t
figure this out. I followed the flickr.rb screencast, and now I’m
to modify it, but I can’t figure out how to paginate photos.
In other words, I want it to only display 10 photos (:per_page =>
but then I want to be able to page back and forth to see the rest.
Anyone done anything similar? I’ve been looking for quite some time
If you take a look at flickr.rb, you’ll find its photos method simply
collects the photo ids returned by the Flickr method
That Flickr method actually provides you with the total number of
matched items, but this information is not used by flickr.rb. You
may want to modify the photos method a bit so that it returns
that number (and perhaps other pagination info too, along with the
photos). Then just as Dogulas Shearer has said, you can go back and
forth using the page parameter.