I am trying to get the Tags Plugin (https://github.com/CakeDC/tags) to work using the find by method (pagination) as outlined at the following example:
https://github.com/CakeDC/tags/wiki/Find-tagged-objects
The tags seem to be setup and working as I can add tags to my 'items' model but I cannot search by.
I have my code as follows (function index):
if (isset($this->passedArgs['by'])) {
$this->paginate['Tagged'] = array(
'model' => 'Item',
'tagged',
'by' => $this->passedArgs['by']);
$items = $this->paginate('Tagged');
} else {
$this->Item->recursive = 1;
$items = $this->paginate();
}
$this->set('items', $items);
$this->set('tags', $this->Item->Tagged->find('cloud', array('limit' => 10)));
When I click though from my tags cloud I get this error:
Indirect modification of overloaded property ItemsController::$paginate has no effect [APP/Controller/ItemsController.php, line 20]
Line 20 is: $this->paginate['Tagged'] = array(
Any idea where I am going wrong?
Thanks