Gossamer Forum
Home : Products : DBMan : Installation :

Print alphabetized (instead of numerical) links for multi page search results

Quote Reply
Print alphabetized (instead of numerical) links for multi page search results
Hi there,

I have created a highly customized concoction of dbman, it's a gallery of Apple Newton MessagePad users. (Newton MP is the father of all PDA's). ( http://newtongallery.virtualave.net ).

Everything is working just fine, however, I have gotten a modification request that makes sense and would like to implement.

I have defined hard coded links to list the database's entries in alphabetical order, sorted by people's last name.

A little odd are the links to the remaining pages, you know, the numbers 1 2 3 4 5 >> at the top and bottom of the search result page.

In my case it would fit much better to offer alphabetical links, for instance, like so:
Ar.. Et.. Ge.. Tr.. Va.. >>. The links would (in this example) stand for people's last names, eg. Arlen, Eton, Geronimo, Trebeck, Vaughn.

The alphabetized links would merely replace the numbered links, ie. the links would still point to the same pages. Those people just happened to be the first on each of those pages.

Does someone have an idea how to do this ?

Georg
Quote Reply
Re: Print alphabetized (instead of numerical) links for multi page search results In reply to
Hmm, not easily, no. It would be quite a bit of work to translate the number indexes to names.

You could create a "rolodex" type toolbar though with letters a .. z and have each letter search the database like:

db.cgi?uid=default&view_records=1&Last_Name=^a&re=1

which will pull up all records where Last_Name starts with an a. Do the same for each letter.

Hope that helps,

Alex
Quote Reply
Re: Print alphabetized (instead of numerical) links for multi page search results In reply to
 
Quote:
You could create a "rolodex" type toolbar though with letters a .. z and have each letter search the database like: db.cgi?uid=default&view_records=1&Last_Name=^a&re=1 which will pull up all records where Last_Name starts with an a. Do the same for each letter.

Hm, that's one way. Not very elegant though, because on the result page, you still end up having the numbered links for the other pages.

If you could determine the database's key of each record that was at the top of each page it would be relatively easy from there to read out the field that the last name is stored in ? Hence you could form the link text.

Is this possible ?

Georg