Hi, I've tried it myself and it seems to work. But again I am not exactly sure what you are trying to archive. Can you be more precise in stating what doesn't work? I might actually just run into this issue sooner or later if it doesn't work :)
/albums/index/page:2/limit:3 and album.id = 08b54ca4-eb87-11e1-ba1c-080027796c4c returns good results: array( (int) 0 => array( 'Gallery' => array( 'id' => '1eb4f5d6-eb87-11e1-ba1c-080027796c4c', 'name' => 'gallery 4' ), 'Album' => array( (int) 0 => array( 'id' => '08b54ca4-eb87-11e1-ba1c-080027796c4c', 'name' => 'album 1' ) ) ) ) Here is the sample data I am using 08b54ca4-eb87-11e1-ba1c-080027796c4c album 1 08b54ee8-eb87-11e1-ba1c-080027796c4c album 2 0fba2b5a-eb87-11e1-ba1c-080027796c4c album 3 0fba2cb8-eb87-11e1-ba1c-080027796c4c album 4 1b100d80-eb87-11e1-ba1c-080027796c4c gallery 1 1b100f7e-eb87-11e1-ba1c-080027796c4c gallery 2 1eb4f46e-eb87-11e1-ba1c-080027796c4c gallery 3 1eb4f5d6-eb87-11e1-ba1c-080027796c4c gallery 4 album / gallery 08b54ca4-eb87-11e1-ba1c-080027796c4c 1b100d80-eb87-11e1-ba1c-080027796c4c 08b54ca4-eb87-11e1-ba1c-080027796c4c 1b100f7e-eb87-11e1-ba1c-080027796c4c 08b54ca4-eb87-11e1-ba1c-080027796c4c 1eb4f46e-eb87-11e1-ba1c-080027796c4c 08b54ca4-eb87-11e1-ba1c-080027796c4c 1eb4f5d6-eb87-11e1-ba1c-080027796c4c Cheers, Remy On Tue, Aug 21, 2012 at 6:02 PM, André Luis <[email protected]> wrote: > Thanks Remy, but it worked in previous version of CakePHP, but now doesnt > work anymore... > > Em terça-feira, 21 de agosto de 2012 09h15min50s UTC-3, remy escreveu: >> >> Hi there, >> >> Have you looked at this post: >> http://cakebaker.42dh.com/**2007/10/17/pagination-of-data-** >> from-a-habtm-relationship/<http://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-relationship/> >> >> That would translate into this for you, if I'm guessing it right: >> >> <? >> // app/controllers/albums_**controller.php >> class AlbumsController extends AppController { >> public $paginate = array( 'Gallery' => array('limit' => 4, 'joins' => >> array( >> array( >> 'table' => 'albums_galleries', >> 'alias' => 'GalleriesAlbum', >> 'type' => 'inner', >> 'conditions'=> array('GalleriesAlbum.gallery_**id = >> Gallery.id') >> ), >> array( >> 'table' => 'albums', >> 'alias' => 'Albums', >> 'type' => 'inner', >> 'conditions'=> array( >> 'Albums.id = GalleriesAlbum.album_id', >> 'Albums.id' => '1' >> ) >> )))); >> >> public function index() { >> $data = $this->paginate('Gallery'); >> debug($data); >> exit; >> } >> } >> >> Cheers, >> >> >> On Mon, Aug 20, 2012 at 6:53 PM, André Luis <[email protected]> wrote: >> >>> Hi people, i´ve searched for it but I didnt find anything wich really >>> works. >>> >>> I have some Albums, wich the model is Album, and Album HABTM Gallery, so >>> a gallery can be visible in more than one album. It works fine, BUT i need >>> to create a pagination for galleries, and all that i´ve found here didnt >>> work for me. What i need is to use a specific Album to paginate a gallery. >>> Is that possible? and how can be done? >>> >>> Thanks! >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "CakePHP" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to cake-php+u...@** >>> googlegroups.com. >>> >>> Visit this group at >>> http://groups.google.com/**group/cake-php?hl=en-US<http://groups.google.com/group/cake-php?hl=en-US> >>> . >>> >>> >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > Visit this group at http://groups.google.com/group/cake-php?hl=en-US. > > > -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
