Saturday, November 17, 2012

CakeDC Comments Plugin - How is the $comment variable put together?

I'm trying to figure out how the $comment variable is put together in the Comments Plugin from CakeDC. I need the variable to contain a new column that I've added to the table and also the data from a different model which I've attached via a component (Ratings).

I've tried following the CommentWidgetHelper to figure out where the $comment variable was put together, but I get lost in the main.ctp file under View\Elements\comments\threaded. This is the view that generates the comment-tree. This view passes a variable called: ${$viewComments} . I have no idea where this comes from and what it means, but it does seem to be a bottleneck, since it only contains a limited amount of fields from the comments table. Can someone please explain to me the double dollar sign and show me where this variable comes from? 

If I was unclear, feel free to ask, I'll be glad to provide further information.

Thanks in advance!

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
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+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

No comments: