simple codeignier pagination problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: simple codeignier pagination problem (/showthread.php?tid=12283) |
simple codeignier pagination problem - El Forum - 10-13-2008 [eluser]alectrash[/eluser] I have a problem with the codeigniter pagination class I have a page tags showing items from a database, images, videos etc this is function tags from my controller page 'gallery'. I want pagination to be like http://mydomain.com/gallery/tags/cars/5 i.e Get out of all database all items tagged as "cars" and show in sets of 5 from 5 onwards. The code works but pagination does not display properly. because I have 7 items tagged as cars when I click on http://mydomain.com/gallery/tags/cars/5 i can see only items 5-7 but the pagination links which are showing at the top of the page are like so Code: <b>1</b> <a href="/gallery/tags/ioct/5">2</a> <a href="/gallery/tags/ioct/5">></a> the 1 should be a link and the two should be bold since were on page 2 of results but its not working. any ideas anybody, really stuck. In my controller I have the following. Code: function tags() simple codeignier pagination problem - El Forum - 10-13-2008 [eluser]Dr.Dan[/eluser] Code: $config['uri_segment'] = 5; simple codeignier pagination problem - El Forum - 10-14-2008 [eluser]alectrash[/eluser] thankyou dr dan just what the doctor (you maybe) ordered, lol! I added Code: $config['uri_segment'] = '4'; function in my controller now looks like this: Code: function tags() hope this helps somebody out one day! simple codeignier pagination problem - El Forum - 10-28-2008 [eluser]SamCris[/eluser] THANKS DR.DO & ALECTRASH!!! it just did help me out! i had the same problem!!! i even posted a reply on one of the forums regarding my problem and a minute later i decided to search the forum... and to make things short, i found this! thanks for posting alectrash!! im just carried away cuz i got stuck here last night which worried me alot! thanks guyz! now im back to work! peace out! simple codeignier pagination problem - El Forum - 10-29-2008 [eluser]alectrash[/eluser] no problem man. enjoy ci! |