Re: Blog with posts and comments

2011-12-01 Thread phpMagpie
Not sure what it is you are struggling with ... if you want to add a comment to a Post then echo a form with a hidden field containing Comment.post_id. If wanting to view a Post and it's comments then: $this->set('post', $this->Post->find('first', array( 'conditions'=>array('Post.id'=>$id),

Re: Blog with posts and comments

2011-11-30 Thread joserafael
Thank you euromark but the console not create a nice posts with comments. I need a little code example how to do it. :-) On 30 nov, 12:19, euromark wrote: > please take a lot at the book starting right about > here:http://book.cakephp.org/2.0/en/console-and-shells/code-generation-wit... > > On 3

Re: Blog with posts and comments

2011-11-30 Thread euromark
please take a lot at the book starting right about here: http://book.cakephp.org/2.0/en/console-and-shells/code-generation-with-bake.html?highlight=bake On 30 Nov., 17:15, joserafael wrote: > No, the blog tutorial cover only post. I dont know who to do it > > On 30 nov, 07:12, phpMagpie wrote:

Re: Blog with posts and comments

2011-11-30 Thread joserafael
I use in the console "cake bake" all the time. The relation Has Many and Belongs To is Ok. But when create a new comment I must to select the post in a select field and no directly. This way is not elegant and functional. On 29 nov, 16:54, euromark wrote: > you shoudnt use "scaffolding" but bake

Re: Blog with posts and comments

2011-11-30 Thread joserafael
No, the blog tutorial cover only post. I dont know who to do it On 30 nov, 07:12, phpMagpie wrote: > Does the blog tutorial not cover all of this? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.or

Re: Blog with posts and comments

2011-11-30 Thread phpMagpie
Does the blog tutorial not cover all of this? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email t

Re: Blog with posts and comments

2011-11-29 Thread euromark
you shoudnt use "scaffolding" but bake your code using the bake shell then you probably discover that all your problems are gone On 29 Nov., 16:55, joserafael wrote: > If anything I could do in cakephp is to relate a table of news with > commentary. Yes, that is simple but I can not find the sol

Blog with posts and comments

2011-11-29 Thread joserafael
If anything I could do in cakephp is to relate a table of news with commentary. Yes, that is simple but I can not find the solution. When I make the scaffold I have no problem. The hasMany and belongsTo is created in the model. But when I select a comment post via a dropdown menu and it is not fun