Pagination works through the model, not through query results...
Try:
$this->paginate = array('conditions'=>array('project_type_id' => 2)));
$this->set('large', $this->paginate('Proposal'));
On Tue, 2011-01-25 at 10:06 -0800, butterlamb wrote:
> I'm developing an app in 1.3x and I'm trying to find the best way to
> paginate the results in an index-like view.
>
> So far I have:
>
> $large = $this->Proposal->find('all',
> array('conditions'=>array('project_type_id' => 2)));
> $this->set('large', $this->paginate());
>
> in the controller.
>
> In the view, I'm getting an undefined variable notice and an invalid
> foreach argument. Would anyone happen to know what else I'd need to do
> in my view to have a paginated list of results?
>
> Thanks in advance,
>
> Butterlamb
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and
> help others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this
> group at http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php