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.
Yii certainly requires good programming skills, PHP, at least basics of object oriented programming. If you know all that, then you can start in a week. After a month or two you'll be doing things correctly. After about 3 months you should be comfortable.
Yii has a low-entry barrier. In other words, it is really easy to learn. Developers describe it as a PHP framework that is most simple.
Yii framework uses “Gii” tool, which is a web-based code scaffolding tool that is used to create code quickly. Using this, we can create templates in models, controllers, forums, modules, extensions, CRUD controlled actions, and views.
Yes, it is! Yii is a fast, secure, and efficient PHP framework. Flexible yet pragmatic. Works right out of the box.
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With