I have Posts_controller and I have Comments_controller and their models and views.
Everything is alright, but my question, how can I combine them, so comments would appear in the same page as posts? In CakePHP tutorial they don’t do that. I could include, but I don’t think it’s appropriate. Thanks.
Here is the short answer to your question:
You need to do a hasMany relation like this: Posts -> HasMany -> Comments
You set that up in your Posts model file. models/Post.php
Then when you run a $this->Post->find(..) – It will return comments for the post. You then use a foreach in the helper to print them out.