Hi all,
I am following the instruction in the cookbook web site of CakePHP: link text
And got this error:
Undefined variable: paginator [APP/views/post/index.ctp, line 46]
I am not sure if $paginator is a built-in variable in cakePHP 1.26.
In my Controller, I have this:
$this->set('posts', $this->Site1->find('all', array('conditions'=>array('Post.zero'=>'0'), 'order'=>array('Post.created DESC'), 'limit'=>'3')));
And in the .ctp file, I have this:
<table>
<tr><td>
<?php echo $paginator->numbers(); ?>
<?php
echo $paginator->prev('Previous', null, null);
echo $paginator->next(' Next', null, null);
?>
</td></tr>
</table>
How do I know if Site1 or Post is not the default Model in a controller?