Noob: Advice on Next / Prev functions and anchors ... |
[eluser]bloopy[/eluser]
Hi, I have two problems caused by two anchors that find the next / previous row of a DB. As they are call separate functions my URL goes from "localhost/details/3" to "localhost/PREVIOUS/2" Q1: What's the CORRECT way to integrate both functions so the URL remains the same ? Q2: How do you make the anchors disappear if they are on the first or last row of the DB ? Some code ... This is my original function: Code: function details() And this is my 'Previous' function: Code: function previous() Sorry for the noob question, I've only been working on CI for two weeks ! :-)
[eluser]bloopy[/eluser]
[quote author="InsiteFX" date="1268686354"]Pagination Class Enjoy InsiteFX[/quote] Thanks for the quick reply! I originally thought the pagination class would work, but ... 1/ I only have one record selected at this point. 2/ I couldn't customise the links to only show ONLY '<' and '>' symbols. I have a feeling pagination is the answer, unfortunately I'm still getting to grips with CI.
[eluser]bloopy[/eluser]
Ok, so after a bit of playing it looks like pagination IS the answer I'm looking for. I still can't customise it how I'd like though ... anyone ?
[eluser]Amzad Hossain[/eluser]
If you are in so much in need of that look then hack the core ..
[eluser]danmontgomery[/eluser]
I don't use the pagination class, but I would think you could do something like: Code: $config['num_tag_open'] = '<!--'; To hide all of the links except next/prev page in html comments so they aren't visible
[eluser]bloopy[/eluser]
Legend ! that's exactly what I'm looking for. :-) Well, I've pretty much got what I'm after now, thanks for all your help guys. |
Welcome Guest, Not a member yet? Register Sign In |