Blog tutorial - confused on the DELETE POST step - please help

i am following the tutorial, and i arrived at this step:


Deleting Posts

When a post is displayed using the show operation, we display a delete link if the current user is the system owner. Clicking on this button would cause the deletion of the post. Since the post deletion is causing the change of the server-side data, we use a POST request to trigger the deletion. We thus use the following code to generate the delete button:

<?php echo CHtml::linkButton('Delete',array(


  'confirm'=>"Are you sure to delete this post?",

)); ?>


So, here we go again:

WHICH file, and in which directory, is this line supposed to be added?

please advise


You may refer to the code of the blog demo itself. In the file of _post.php under protected/views/post/, you can see this piece of code.

Thanks for the tip

Just wondering, is the _post.php supposed to be created by me? I did not see it in the blog folder created as I followed the tutorial.


ps: is there another tutorial somewhere on the net on Yii that explain steps in more detail? I notice the tutorials here assume many things on the part of a newbie like me.

I appreciate your tip, thanks.

Well, I think there may be much abbreviation in this document. If you know PHP well, I would recommend you reading the code instead, as the application is not big.