[email protected]
[Top] [All Lists]

Re: different pagination across views (not controllers)

Subject: Re: different pagination across views not controllers
From: Devario Johnson
Date: Tue, 11 Jan 2011 09:55:36 -0800 PST
Hi all...found my own answer to this question and i hope this helps
someone .

in your function in the controller that you would like to have the
custom order on do this

$this->paginate = array('order' => 'yourModel.yourColumn DESC');
$data = $this->paginate('YourModel', array('yourColumn' =>

On Jan 11, 11:07 am, Devario Johnson <devario...@xxxxxxxxx> wrote:
> Hi, im sure this is a simple question but i can't find any docs
> related to this...
> I have multiple views coming from one controller (as normal)
> I would like to paginate them differently in each view.
> say view a, b, and c, are paginated ASC and view d, and e, are
> paginated DESC
> I have in my controller at the top the var $paginate with order
> defined.
> this seems to effect ALL uses of the $this->paginate across any views
> associated with the controller.
> How do I get them to act independently?
> I already tried removing it from the top and adding it in each
> function but that didnt work.
> I also tried adding 'order' to the actual paginate (find) query and
> that does not work either...
> any ideas?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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] For more options, visit this group at 

<Prev in Thread] Current Thread [Next in Thread>