simple codeignier pagination problem |
[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()
[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!
[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!
|
Welcome Guest, Not a member yet? Register Sign In |