Customize default yii application structure

To create yii application, command is ./yiic/webapp app-name.
Application is generated under framework folder and it is as per default yii defined structure.
This guide is to customize the structure of default Yii application generation.

The default webapplication created is copy of  yii/framework/cli/views/webapp.
To customize it, one can change it directly, but it is not recommended way.
We should make a copy of it and save as different name like mywebapp.
New copy should be in same folder  yii/framework/cli/views.
Make all changes as per your file structure and change in code, add components,theme for your application in it.

Open webappcommand.php file from   yii/frameworkcli/commands.
We need to change SourceDir name to our new name.Change following line in code

Now our new yii web application structure is ready.
Run ./yiic webapp app-name,& It will make a application as per your changes.
You can generate application yii default or customize by changing source directory in webappcommand.php file.
Start customizing it!!!
All the best!!!
Have a good day!!!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s