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 API
http://api.cakephp.org/1.2/class_paginator_helper.html#9c836737a166d2cdb2c0f666add5d845
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
-~----------~----~----~----~------~----~------~--~---