Page 1 of 1

Paginating Results and static bookmarkable / savable pages

Posted: Tue Mar 27, 2007 10:53 am
by duncanwilkie
1. I want to have a simple results pagination - sort of DONE (I have simple pagination).
2. Whats the best way to make these results bookmarkable or savable items - even if the page data can change its state to one that would NOT be returned by the results?

- Overview: Property Website
Results: Available Properties (Rental)
When NOT available then page has basic details but says that this property has gone.

Should I ...
a. create all the pages as new property are added; really don't want to have to do this; cos its not something I personally want to update; and creating a template, and having to add support.

b. Is this the alternative; should I use php to create a page based on a template generated by a submission of a form based on php that can create pages? - must also be able to delete pages. - The trouble with this seems to be that it could suddenly burden the site with lots of pages.

c. Is this possible? Have the bookmark recognise the individual result by the primary key for this results?

d. Just use cookies to recognise the user, and then allow them to save any properties they are interested in?

Any links to useful pages would be most appreciated!

Posted: Tue Mar 27, 2007 5:27 pm
by feyd
The search terms (and any other specifics to regenerate the same query) would need to be in the URL, that's really it.

Posted: Wed Mar 28, 2007 12:09 pm
by RobertGonzalez
I had to do the same exact thing. I have a search from that I built which results in tabular data output that allows for paging and sorting. The thing is, it has to maintain the sort request, the page number and the form search values. The only way to do that is through the query string.

Posted: Wed Mar 28, 2007 1:02 pm
by Begby
With regards to your other questions, you don't want to ever be actually writing pages to the server with PHP. Instead you have one page where the content changes based on data from a database.

So, if they are choosing a property with primary key of say 50, you retrieve that record from the database and display info about it. If the property is not available then you put an if statement in there to indicate that its not available.

If the property not longer exists, (say if the user had the page bookmarked), then you do a test for that and display and friendly error.