Yii Layouts

Hello,

i created yii modules example admin

with this hierarchy

admin ->

components

messages

models

views

AdminModule.php




public function beforeControllerAction($controller, $action) {

        if (parent::beforeControllerAction($controller, $action)) {

            // this overwrites everything in the controller

            $controller->layout = '//layouts/column1';

            // this method is called before any module controller action is performed

            // you may place customized code here

            return true;

        }

        else

            return false;

    }



in $controller->layout written //layouts/column1 get the original directory, but not in modules directory

written $controller->layout = ‘main’; get same problem.

I read some this forum information, but don’t find working example.

Can help any one with layouts

In views directory

default

index.php

layouts

column1.php

main.php

Work, just in layout don’t change text :D How can delete post ?

Leave it for further readers…

ok