View Flow in Yii
Working with the framework, in the current web develop, should understand the concept of MVC. In this post, will sy tangent about the view. In the jni section, handle the look or layout of web design. Yii framework, has a plot in the view as follows.
1. Initially first, by default the web will access the index.php file located in view/site/index.php
2. The default view yii, can be modified by converting the file into public variable $ layout declared in siteController
3. Suppose a public variable $layout="//layouts/coulumn2"
4. Please modif the coulumn2.php file that is on protected/view/layouts/
note the above script coulumn2.php
<?php $this->beginContent('//layouts/main'); ?>
5. You can add a Div or an additional tag. If you want a better view, then learn the themes with css bostraps
6. So on, when opening the module, then note the public variable $ layout that exist in each controller.
In summary, the View flow can be written Main.php ->coulumn2.php->controller->_form