Keep track of wines you've tried, and discover new wines you're sure to enjoy!   Joining is easy and free »

We’ve been back to work on the site now for a few days. Here’s my current to-do list:

  • Admin Screen for Editing Wine Entries
  • Star Ratings for Wines
  • Wine Recommendations
  • Comment System
  • Pagination for Search Results

As you can see, I’ve made some progress on the search results page. Things are formatted a little better, but the biggest addition is the pagination links at the top which makes it now possible to browse to every wine in the database (we used to show just the first 15 results).

Yahoo! has a pretty interesting design pattern for search results pagination over at their developer network. I decided, however, to mimic the pagination done at digg.com. I’m pretty happy with the results, although I was torn over whether to use numbered pages or alphabetical links. In the end, I thought the numbers were more flexible.

You can see what the results of all this by doing a search on the alpha site.

My code for the pagination is a mess (like a lot of the WineLog code at this point). I might spend some time fixing it up now that it’s working though; this is code that may be useful to others trying to mimic digg’s pagination scheme. Let me know if you’re interested in seeing it and I’ll move it up my list of to-dos.

Jason is a co-founder of WineLog. View Jason's Wine Log.
March 29th, 2006 |  Jason

3 Responses to “Digg-style Pagination for Search Results”

I am impressed by your pagination design and was wondering if you might be willing to share it as a code example which I could modify for my own work. Myself, I use completed result sets from a search engine in the form of an array to which I need to add page numbers. I would appreciate any help you might be willing to give.

-danke

Posted by Orbit on May 2nd, 2006 at 12:13 pm.

Danke,

Thanks for the compliments on the design, although I took the look straight from Digg. I imagine their designer was the first to do it this way, but I have seen other sites with similar pagination. Don’t know which came first.

I’d love to give you some of the code I used for pagination, but (1) it’s embarrassingly bad and (2) it would probably confuse you more than help you.

I’m fond of how it looks and works though. And so I have every intention of writing a modular function to do pagination like this (so I can use it on other sites of mine). There’s a chance I may get to it this weekend. If I do, I’ll definitely post it here and send some code to your email address.

Posted by Jason on May 2nd, 2006 at 10:14 pm.

[…] In this post, I promised to show the world how I achieved my digg-style pagination effect. I’ve written a demo over at Stranger Studios. […]

Subscribe by Email

Enter your email address below to have updates delivered to your inbox:
© 2005 - 2007 WineLog.net and Stranger Studios, LLC. All rights reserved | Powered by Stranger Studios