Multiple Pagination on the same page |
[eluser]visormatt[/eluser]
So I have a page in which I would like to use the pagination feature in 3 different areas on the same page each with slightly different settings. As of right now it is working but here is my problem data_1 -> i would like to display 3 rows data_2 -> display 5 rows but when ever the number in the URL segment gets large enough (page 3 of column 1) the links on column two jumps over to page 2 I am setting the pagination config inside of the actual view which may have something to do with it... You can view here @ http://dev.fillinourfuture.org/ CONTROLLER Code: function index() MODEL Code: public function view_news_feed() VIEW Code: <?php foreach($qNews as $rNews): ?>
[eluser]Unknown[/eluser]
I am having this same problem and was wondering if anyone fixed it or if it is even possible to have multiple instants of pagination on the same page.
[eluser]ommy[/eluser]
stupid thing to say. *slaps myself on the hands for posting the previous reply* Lets say you need more than one pagination on a page. Dump the information create_links() gives you into a var you assign to your layout, this will allow you to create X pagination on one page. The crappy part is figuring out a way to pass all the current page vars to your controller i think. Hope this helps you guys T
[eluser]ommy[/eluser]
i passed along the page number of the other columns to make sure the uri didn't skip any segments. That seems to work up until now. If i read your post correctly (which i didn't do yesterday) i should be expecting issues when my paging receives a little more content? T
[eluser]disco_d[/eluser]
Attachments seem to be broken and im working on the problem an external link would be much appreciated if at all possible
[eluser]hnaoueik[/eluser]
Guys , could u please upload again the multipagination.zip for me . Please. Link dies ! Thanks in advance !
[eluser]peroperje[/eluser]
This is not codeigniter way ... but why not Code: $this->load->library('pagination');
[eluser]Unknown[/eluser]
[quote author="simona" date="1324496348"]Found this thread while searching for exactly the same problem as the OP. I need two paginations on a single page. My URL is of the form: http://www.example.com/controller/method...t1/offset2 where offset1 is the offset of the first pagination and offset2 is the offset of the second pagination. I thought I had managed to solve the problem only using the CodeIgniter pagination class by setting config['suffix'] and config['first_url'], but I think I found a bug. I had controller code of the form: Code: public function method($offset1 = 0, $offset2 = 0) { but the codeigniter pagination class was not appending the suffix to the "First" link or the "Previous" link :-S So I fixed it, see the attached file (just modified two lines of the codeigniter pagination class create_links() method). The code above works with the attached MyPagination library. Hope this helps![/quote] Can I have that Mypagination library? I don't see any attached library |
Welcome Guest, Not a member yet? Register Sign In |