In yii,I create a module called "admin" and I want to set the module to use the layouts I customized other than the defalult.so I seach some posts and it worked!
this is the post I read:
http://www.yiiframework.com/forum/index.php/topic/24767-module-layout/
after i configured my app as the post,my app worked very well.but now I have some quetions:
-
the layoutPath
the post said configure$this->layoutPath = Yii::getPathOfAlias('administration.views.layouts');
the layoutPah variable confuse me very much,it seems this var not be defined in any class.so why it can be called by$this
? -
/layouts/main
what is the difference between/layouts/main
and//layouts/main
when use//layouts/main
it will not worked,the app still call the default main layout not mine? -
overwriting
the post also said thepublic $layout='//layouts/column1';
in controller overwriting the value set in theinit()
method for the module controller 。 is this tru?