Bonjour

J'essai de configurer ce plugin http://cakedc.com/downloads/view/cakephp_tags_plugin

Lorsque j'arrive aux instructions suivantes j'ai un message d'erreur :[b] Notice (8): Undefined property: WorksController::$TagCloud [APP\controllers\works_controller.php, line 85][/b]

[b]Suivi de : Fatal error: Call to a member function display() on a non-object in[/b]

Pouvez vous m'aider svp ?
[code]
Add the TagCloud helper to your controller

var $helpers = array('Tags.TagCloud');

In you controller action, get a list of tags and pass it to the view. The Tagged model contains a custom find method _findCloud() which retrieves all the tags and populates values.

Here is an example code from a RecipesController, where Recipe actsAs Tagable:

$this->set('tags', $this->Recipe->Tagged->find('cloud', array('limit' => 10)));

Call the display() helper method where you want to display the cloud. For instance:

<ul id="tagcloud">
<?php 
    echo $this->TagCloud->display($tags, array(
        'before' => '<li size="%size%" class="tag">',
        'after' => '</li>'));
?>
</ul>

Will generate a code like:

[/code]

Aucune réponse