Yes. It just return the result with limit set in controller. So
basically the view doesn't change at all.
<?php echo $paginator->link('10', array('action'=>'index'),
array('limit'=>10, 'page'=>3)); ?>
should make link like this: href="/Customers/index/limit:10/page:3"
But I get link like this: href="/Customers/index/page:1"
I also set the limit and page with $paginator->options(). I tried
without ajax call. It doesn't work.
I tried the following:
<?php echo $paginator->link('10', array('action'=>'index', 'limit:
10')); ?> |
<?php echo $paginator->link('20', array('action'=>'index', 'limit:
20')); ?> |
<?php echo $paginator->link('30', array('action'=>'index', 'limit:
30')); ?>
Output links like this: 10 | 20 | 30
It only work the first time. If I click on '10', the limit is set to
10, 'limit:10' is appear at the end of every link.
The link for '20' looks like this after click on '10': href="/
Customers/index/limit:20/page:1/limit:10"
On Jul 26, 2:43 pm, rtconner <[EMAIL PROTECTED]> wrote:
> What is it doing? Just giving you a full list of every record in the
> database?
>
> On Jul 26, 2:52 pm, jpp <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I followed the instruction from the following article and pagination
> > works excepts I can't set the limit and page options in
> > View.http://bakery.cakephp.org/articles/view/advanced-pagination-1-2
>
> > I set the limit in 3 places: in controller $paginate, in view
> > $paginator->options(), and in $paginator->link()'s last parameter
> > option array.
>
> > In Controller:
> > var $paginate = array('limit' => 1, 'page' => 1,
> > 'order'=>array('name'=>'asc'));
>
> > In View:
> > <?php
> > $paginator->options(
> > array('update'=>'CustomerPaging',
> > 'url'=>array('controller'=>'Customers',
> > 'action'=>'display'),
> > 'page'=>2,
> > 'limit'=>5,
> > 'indicator' => 'LoadingDiv'));
> > ?>
>
> > <?php echo $paginator->link('10', array('action'=>'index'),
> > array('limit'=>10, 'page'=>1)); ?>
>
> > It should work according to the
> > APIhttp://api.cakephp.org/1.2/class_paginator_helper.html#9c836737a166d2...
>
> > Am I missing something? Is it a bug?
> > Thank you.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---