Re: Multiple pagination same view
In this case it's the same model that being paginated multiple times. Can you explain 'have some vars that take other values'? Or maybe a short example? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Multiple pagination same view
Does anyone know how to have multiple blocks (multiple tables for example) of paginated data on the same page? There seems to be 2 issues: 1) the navigation section ($paginator->next, etc) gets overwritten by the last pagination on the page. So the navigation data and page counts are correct only for the last pagination instance. 2) clicking a link in the navigation section to show a new page will affect each instance of pagination. Thanks very much, ML --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Baked views missing hasAndBelongsToMany select boxes
Hi, I've baked models, controllers, and views for 2 tables that have a hasAndBelongsToMany relationship to each other. The models are Item and Category, and the categories_items table exists with id, category_id, and item_id columns. However if I add or edit an item, for example, the multi-select box with a list of categories does not appear in the view. But if I turn on scaffolding, the views correctly display the categories, so I believe the relationships are set up correctly. Any idea why the views are missing the categories? Thank you very much, ML --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Multiple paginators
That's right, you can set the page size etc. individually and the paginators render perfectly. However, the $paginator->next and $paginator->prev update both of the paginators, which is obviously not desired. On Jan 19, 6:51 am, Amit Badkas wrote: > You can provide model's name to paginator's > options,http://book.cakephp.org/view/656/Methods > > 2009/1/19, ml : > > > > > > > This could be a common problem, but searching this group provided no > > discussions with any pagination related words. I assume there could be > > something wrong with the search since pagination is probably a very > > widely used feature. > > > Anyway, I'm trying to add two or more AJAX paginators on a view. When > > adding two paginated models from a single controller, all the models > > share a paginator meaning they all jump when one of them gets clicked. > > I'm doing this in the controller: > > > $teams = $this->paginate('Team'); > > $users = $this->paginate('User'); > > > debug($teams); > > > $this->set(compact( > > 'teams', > > 'users')); > > > After this, paginators can be added on the view for both teams and > > users, but the $paginator->prev and $paginator->next affect both of > > the paginators simultaneously. > > > If I get the paginated data with requestAction from a view or element, > > no paginator at all is created on the view. > > > How can I create more than on pagination helpers on the view? > > -- > Amit > > http://amitrb.wordpress.com/http://coppermine-gallery.net/http://cheesecake-photoblog.org/http://www.sanisoft.com/blog/author/amitbadkas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Multiple paginators
This could be a common problem, but searching this group provided no discussions with any pagination related words. I assume there could be something wrong with the search since pagination is probably a very widely used feature. Anyway, I'm trying to add two or more AJAX paginators on a view. When adding two paginated models from a single controller, all the models share a paginator meaning they all jump when one of them gets clicked. I'm doing this in the controller: $teams = $this->paginate('Team'); $users = $this->paginate('User'); debug($teams); $this->set(compact( 'teams', 'users')); After this, paginators can be added on the view for both teams and users, but the $paginator->prev and $paginator->next affect both of the paginators simultaneously. If I get the paginated data with requestAction from a view or element, no paginator at all is created on the view. How can I create more than on pagination helpers on the view? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---