I am using cakephp 2.0 and trying to create ajax paging which i cant in the documentation i read that passing this
$this->Paginator->options(
I had same problem but in my case the id of the div tag in layout file was wrong. It should be "content".
Please don't forget to add the $this->Paginator->numbers() after you tell pagination helper that you want a javascript link instead of plain html
<?php
$this->Paginator->options(array(
'update' => '#content',
'evalScripts' => true,
'before' => $this->Js->get('#busy-indicator')->effect('fadeIn', array('buffer' => false)),
'complete' => $this->Js->get('#busy-indicator')->effect('fadeOut', array('buffer' => false)),
));
?>
<?php echo $this->Paginator->numbers();?>
Actually, there are example in the book here. Look for the Ajax Pagination section. Make sure to follow all of the directions and it'll work.
You need:
$this->Js->writeBuffer()
) in your view/layout. It'd suggest putting this in your view unless you load the Js helper in your AppController
because otherwise $this->Js
won't be defined.The example in the book uses jQuery and works.