I am facing a huge problem in my app.I am trying to use pagination and
in actions that have arguments pagination doesn't work because the id
is not passed.The url looks like : http://localhost/voyage~voyage-source/index.php/parameters/view/1
and when i click on 2nd page to see results the url is like this :
http://localhost/voyage~voyage-source/index.php/parameters/view/page:2
, which means the id:1 is not passed.I have tried to put this code in
my view ---> $paginator->options(array('url' => $this->passedArgs));
but nothing happened.
Here is my function code:
function view($test_id = null) {
$this->layout = 'list_parameters';
$this->paginate['Parameter'] = array(
'limit' => 10,
'order' => 'Parameter.id asc',
'conditions' => array
('Parameter.service_id'=>$test_id)
);
$data = $this->paginate('Parameter');
$this->set('data', $data);
}
and my view code:
<?php echo $paginator->numbers();
$paginator->options(array('url' => $this->passedArgs));
?>
<?php
echo $paginator->prev('« Previous ', null, null, array('class' =>
'disabled'));
echo $paginator->next(' Next »', null, null, array('class' =>
'disabled'));
?>
<?php echo $paginator->counter(); ?>
.......
......
Plz help me if you know!
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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment