![]() |
PHP Pagination Question(s).
So this week my goal is to setup pagination on my recipe site but, before I dive in I was hoping to get some feedback.
I've been researching a few different options, mainly whether I should begin with recipes.php?page=0 or recipes.php?page=1 as the first page, does either option matter significantly? I have read in a few places then when dealing with potentially hundreds of pages, using OFFSET can cause issue? Secondly, I'm thinking of using this for the main code snippet: Quote:
Also, is that TOO simple and restrictive as far as the functions go of generating the page navigation? Finally, when it comes to the navigation itself, is it best (in your experience) to just have numerical pages listed or should I also include a 'PREVIOUS' and 'NEXT' link on the navigation structure? Thanks in advance for any advice and feedback you can offer :thumbsup |
Unfortunately nobody can really answer your questions as well as you can yourself, because nobody but you knows what you want to achieve.
Personally I would never use pagination even if the fate of the world depended on it, but then I also wouldn't use a database or PHP when it can be avoided, and I have no idea why you're trying to code everything from the back end to the front end yourself when there are plenty of recipe templates and themes already out there. I think it would actually be less of a chore, and would provide a far better, more interesting/personalized experience for visitors, to simply write a blog on Wordpress.com, adding 10 recipes per day, at least if there's some genuine enthusiasm and knowledge about the subject, than grinding away on what seems to be just another recipe dump like hundreds of others that already exist. To specifically address your questions: Quote:
Quote:
Quote:
If you absolutely must use the worst, most tedious navigation method ever, you can again answer your own question - is it nicer when there's a big PREVIOUS and NEXT button to click, or is it better when you have to exactly hit an 8x8 pixel arrow or number? You're a user too; if you think something makes things easier, do it, and if you think it makes things harder, don't do it. Certainly never let 'style', which is subjective anyway, override user experience. |
Quote:
Quote:
Quote:
Quote:
Based on your opinion, no website anywhere should ever have more than 5 pages. There go all the TGPs, Link Lists, Directories, Review Sites and Pay Site Tours with previews, even GFY has a lot more than 5 pages listed on their page navigation for the forum. :Oh crap Quote:
Quote:
I appreciate your opinions though and will definitely take them into account, thank you :) |
Jesus dude, take this to stackoverflow or something.
|
Quote:
The best way to find out is to simply try it and see if there are issues or not. Worrying about it in advance is just a waste of time and energy. BTW, your answer as to why you're coding it all is a good one. :thumbsup Good luck. |
with pagination, what i like to do is email the visitor the current page, then ask them to enter it on a special form at the bottom of the page. once submitted, i like to shoot a support request over to my ISP and ask them to turn the page.
:2 cents: # |
is it wp pr a php script?
|
Quote:
OP's website should have a "Proudly powered by GFY" statement in the footer by now.:winkwink: |
Quote:
|
Quote:
# |
Quote:
|
All times are GMT -7. The time now is 02:05 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123