/index.php /protected/components/controller.php /protected/config/main.php /protected/controllers/SiteController.php /protected/runtime/ /protected/views/site/index.phpThe minimum necessary configuration file is (/protected/config/main.php):
return array('import'=>array('application.components.*'));SiteController.php should have this method:
public function actionIndex() { $this->render('index'); }That's it!
If you want use a layout, add:
/protected/views/layouts/main.php /protected/views/layouts/column1.phpTo enable gii, you need to add the /assets folder, and add this to your config:
'modules'=>array( 'gii'=>array( 'class'=>'system.gii.GiiModule', 'password'=>'password', ), ),For Model and Crud to work, you need to setup a db connection.
This article may not the right place to post this question, but as you seem know lot about Yii I would like to get the answer for this question which I have posted in following forum.,
ReplyDeletehttp://www.yiiframework.com/forum/index.php?/topic/14752-passing-multiple-values-from-controller-to-view/page__p__73385#entry73385
This is how to pass multiple objects from Controller to View, (actionCreate)
and other question is how to attach multiple file uploads to a model without declaring field for each entry?
http://www.yiiframework.com/forum/index.php?/topic/14754-multiple-file-uploads/page__p__73387#entry73387
@rasika
ReplyDelete1. to pass multiple objects from controller to view, just add them to the data array in the render function. when you pass 'model'=>$model, you can just add more items to that list.
2. to allow multiple uploads to a model i would use an array. check the yii wiki for dealing with tabular input.
Thanl you Neil McGuigan
ReplyDelete