Pagination: Advanced library (SEO friendly first page, more tuning possibilities) |
[eluser]Unknown[/eluser]
Hello, I am just working on a new website and I needed to get more of Pagination library. I tried to find more suitable than the original one, but I failed. So I rewritten the original library "slightly". So what I've changed? What's new? 1) Pages are really pages, so expect 1st page with parameter 1, 2nd page with parameter 2, etc. (so don't look for offsets here :-) 2) SEO friendly link to the first page - 1st page has always the same link contained in $config['base_url'] directive 3) $config['num_links'] - the library will always try to show links to (2*$config['num_links']+1) pages if they are available. Example of 7 pages, $config['num_links'] = 2: a) current page = 4: links to pages 2, 3, 4, 5, 6 will be shown ("4" won't be a link) b) current page = 2: links to pages 1, 2, 3, 4, 5 will be shown ("2" won't be a link) c) current page = 1: links to pages 1, 2, 3, 4, 5 will be shown ("1" won't be a link) d) current page = 6: links to pages 3, 4, 5, 6, 7 will be shown ("6" won't be a link) If there are less then (2*$config['num_links']+1) pages there will be less links of course. 4) New possibilities (config directives): a) $config['first_link_enable'] = <boolean>; // turn on/off "< First" link (default = on) b) $config['last_link_enable'] = <boolean>; // turn on/off "Last >" link (default = on) c) $config['prev_link_enable'] = <boolean>; // turn on/off "< Prev" link (default = on) d) $config['next_link_enable'] = <boolean>; // turn on/off "Next >" link (default = on) And where it grows? (with readme file attached) http://www.myslivecek.net/ci/pagination.zip I'd really appreciate any comments (this is my 1st contribution to this kind of community so let me know if I did something wrong - such as versioning of the file / legal stuff / etc/) |
Messages In This Thread |
Pagination: Advanced library (SEO friendly first page, more tuning possibilities) - by El Forum - 08-22-2010, 10:58 AM
Pagination: Advanced library (SEO friendly first page, more tuning possibilities) - by El Forum - 08-23-2010, 12:38 PM
Pagination: Advanced library (SEO friendly first page, more tuning possibilities) - by El Forum - 08-24-2010, 12:24 PM
|