module layout

first of all I would like to say hello to all users!

secondly i have a question, cause i’m totally fresh to the Yii. I’ve searched the forums but i haven’t find answer.

So far:

  • I have created a skeleton for admin module

  • admin module has its own layout

  • in /web/modules/admin/AdminModule i set layout in this way




$this->layout = "/layouts/infinitech";



Problem:

admin layout file isn’t overrided when a corresponding layout file exists in themes folder, e.g. /web/themes/admin/views/layouts/infinitech (admin module uses /web/protected/modules/admin/views/layouts/infinitech)

the views rendered are:




Context DefaultController

E:.htdocs.infinitech.web.protected.modules.admin.views.default/index


Context DefaultController

E:.htdocs.infinitech.web.protected.modules.admin.views/layouts/infinitech


Context DefaultController

E:.htdocs.infinitech.web.protected.modules.admin.views/layouts/main



why not web.themes… and so on?

Question

Did I misunderstood something from docs or misconfigured sth? Additionally, can anyone explain meaning of the slashes in front of layout path? In blog tutorial there are 2 slashes (//), I found somewhere snippet with no slashes and with one slash and I am slightly confused :)

Shortcut

I would like to achieve situation like that:

i have module with its own layout and views, that could be overrided with theme layout and views - sounds simple but causes me headache:)

i would appreciate any help.

Hi Marr

Welcome to the forum !

this link will help you ( I don’t have time to explain myself)