Page number navigation [1] [2] [3] [4]

6 replies
  • WEB DESIGN
  • |
Hi,

I'm developing a site that will have numerous spill over pages i.e as it grows the main page will need to be split into page [2] [3] ... [100] etc

So down the bottom I will have a sort of index of the page numbers as above [1] [2] [3] ... [100]

The way I'm doing it at the moment is literally doing it with html and links at the bottom of each page. I want the page I am currently on to be not a link but just a plain e.g [20] with all the ones around it to be links.

I'm starting to realise this is not future proof and when I am on page 100 I wll have to go back and add in the extra links to each other page.

I think I will have to do a php includes so I can change them all at one.

But this way the links will all be the same and the page I am currently on will be a link also.

Plus, When the pages numbers are too many to display in a row it's common to see something like this
[FIRST PAGE].. [51] [52] [53] [54] [55] [56] [57] [58] .. [LAST PAGE]

Does anyone know how this system is done with html, css, php includes?

Is there an easy way of doing this?


Any help would be much appreciated. I hope there's an easy method for achieving this!
Thanks.
#navigation #number #page
  • Profile picture of the author Mkj
    Pagination normally requires database entries which can be displayed in various orders. Excellent tutorial here: papermashup.com/easy-php-pagination. Sorry I can't post full urls yet so add http etc to the above. You will need to be familiar with php and mysql to make it work. Obviously this will not work with your setup.

    Can't see how you can avoid having to alter each and every file.

    You could use php files and add database entries as mentioned above but it will take some working out.
    {{ DiscussionBoard.errors[3710190].message }}
  • Profile picture of the author seopress
    Originally Posted by aguswgs View Post

    Hi,

    I'm developing a site that will have numerous spill over pages i.e as it grows the main page will need to be split into page [2] [3] ... [100] etc

    So down the bottom I will have a sort of index of the page numbers as above [1] [2] [3] ... [100]

    The way I'm doing it at the moment is literally doing it with html and links at the bottom of each page. I want the page I am currently on to be not a link but just a plain e.g [20] with all the ones around it to be links.

    I'm starting to realise this is not future proof and when I am on page 100 I wll have to go back and add in the extra links to each other page.

    I think I will have to do a php includes so I can change them all at one.

    But this way the links will all be the same and the page I am currently on will be a link also.

    Plus, When the pages numbers are too many to display in a row it's common to see something like this
    [FIRST PAGE].. [51] [52] [53] [54] [55] [56] [57] [58] .. [LAST PAGE]

    Does anyone know how this system is done with html, css, php includes?

    Is there an easy way of doing this?


    Any help would be much appreciated. I hope there's an easy method for achieving this!
    Thanks.
    When you've seen this I would bet it has often been on wordpress sites using a plugin called WP-Page-Navi which makes this a snap.

    Yes, this project really sounds like something best served by a LAMP CMS like Wordpress, Joomla, Drupal.
    {{ DiscussionBoard.errors[3719407].message }}
  • Profile picture of the author Tautvydas
    There are tons of tutorials on the internet, but you should be using database and programming language (eg. PHP) for this.
    {{ DiscussionBoard.errors[3719875].message }}
  • Profile picture of the author ocrconvert
    Thanks for the information, really helped me as well.
    {{ DiscussionBoard.errors[3723099].message }}
  • Profile picture of the author dassad
    Just a suggestion, since i don't used it but can be done..

    Check the current URL using PHP than at the linking code make a check, if is the same as current URL than display TEXT if is not then display linking code.

    Regards,
    daSSad
    {{ DiscussionBoard.errors[3723298].message }}
  • Profile picture of the author oknoorap
    Use wp page navi and your pagination will looks perfect
    {{ DiscussionBoard.errors[3725780].message }}

Trending Topics