How to implement go to next / previous item?

I have an array of posts, which could be list of all posts, or posts
of certain user, or posts from a tag search. I present it as a
paginated list, with title and brief summary. when the user selects a
post, I show the whole thing on next page.

Right now, I just have a back link to the list, but I’d like to
implement go to next / prev post in list. This is tricky because the
list is gone, of course, and it wouldn’t be easy to save it, and not
easy to calculate for each post b/c it’s not just “find the next/prev
one in the posts table”

I’m using the google interface and they don’t have this implemented
either. the nexy/prev actually goes to the next/prev article in the
entire group and not, for example, in the search result.

I’m using the google interface and they don’t have this implemented
either. the nexy/prev actually goes to the next/prev article in the
entire group and not, for example, in the search result.

On the initial list page setup a global javascript array (or put it in a
cookie or something else persistent) that contains a list of all the
id’s
of the posts themselves (in the right order).

Then on an individual post page you can get the prev/next posts by
finding
the current id in that array and looking at the array element just
before
and just after it.

-philip

you should know the ID of the object so can you run a query to get the
next or
previous post?

Just a though

WW