I am new to Yii framework. I was working on drupal earlier, and the theming of drupal made sites are not difficult to manage. But I just want to know that how to create theme for the site with Yii framework.
I have gone through many sites, but still don't know where to start. For example I have checked http://www.yiiframework.com/doc/guide/1.1/en/topics.theming.
Now my doubts are:
It will be good if anybody will explain it step by step.
You can edit the layouts (protected/views/layouts/..). These are the wrapper views which are rendered around individual views rendered with render()
, for example the site/index calls the index view (located at protected/views/index.php) using:
$this->render("index");
You can change the layout per action using:
$this->layout = "differentlayout";
You can set the layout for all actions within a Controller using:
public $layout='//layouts/differentlayout';
Obviously each layout can have a custom structure and loads different CSS and JS files. I know this isn't using the themes and theming but it is by far the most common way of customizing the look and feel of a Yii project
Here are some helpful links regarding YII theme development: