Hi,

I'm trying to use the cake comments plugin found here  -
http://cakedc.com/downloads/view/cakephp_comments_plugin I'm having
trouble though. I can add comments - it captures datetime, userid,
etc, etc. but it just doesn't display the comments in the widget. I've
added it to the controller's plugins and components arrays, unzipped
the plugin to the plugins folder and added the beforeFilter function.

I put

<div id="project-comments">
                <?php $commentWidget->options(array('allowAnonymousComment' =>
false));?>
                <?php echo $commentWidget->display();?>
</div>

in my view. It displays everything apart from the comments that are
added. So it lets me type a title and a body. I save the comment, get
a session flash saying comment displayed, look at the comments table
and see the comment in there but it's just not displayed in the
widget.

I got confused here so skipped it:

To work properly, the component needs a specific variable to be set in
every action using it. Its name should be either
Inflector::variable(Controller::$modelClass) or Comments::
$viewVariable should be set to other name of this view variable. That
variable should contain single model record. for example you need to
have next line in you view action:


                $this->set('post', $this->Post->read(null, $id));

Can someone help me out? Maybe someone had this problem themselves?

Thanks a lot,

Billy

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to