View folder files

I have trying to learn yiiframework for the last couple of weeks. I have a fundamental doubt.

After the crud operation (by using gii for instance), you land up with many files in the view folder after running the form generator. The snapshot of the issue folder in the trackstar application of the yii book is given here.

My question is what are the function of each file? Which view they render? The simplistic answer that the name of file describe the renderation is not correct. There are some files with underscore and some without it. What convention they are following?

The simplistic answer is correct, they render what they describe. The views with underscores are used as partial views or templates. If you open up each file you can see what the function of the files is.

  • _form - is the web form controls for submission in update and create

  • _search - is similar to _form but for submitting a search (may have less fields to search by), used in admin

  • _view - is a sort of template for fields in a model, used by the index

  • admin - is the view created for admins which is a list of models in a grid view with the _search rendered partial

  • create - is used to create a model, partial renders the _form

  • index - is the view created for normal user viewing with models rendered in a list view, partial renders the _view

  • update - is used to update a model, partial renders the _form

  • view - is used to view one model

Thank you. I was confused with the view.php file mainly. You explained it all…