modules/admin/AdminModule.php modules/admin/modules/forum/ForumModule.php modules/admin/modules/forum/controllers/DefaultController.php modules/admin/views/layouts/main.php modules/admin/views/layouts/column1.php modules/admin/views/layouts/column2.php
I have not configured $layout in ForumModule so it uses the parent modules layout. Everything works fine if in DefaultController i use layout main. But it does not work if i want to use column1 or column2. It never renderse the decorating main.php, only column1.php. Here's the simplified code of column1.php:
<?php $this->beginContent('/layouts/main'); ?> <?php echo $content; ?> <?php $this->endContent(); ?>
The problem is, that when resolving the view file '/layouts/main' for the decorated content, it will always use the layout folder of the current module. This is the forum submodule so it will search in modules/admin/modules/forum/views/layout. It never finds modules/admin/views/layouts/main.php. I even tried to set $layoutPath in ForumModule with no success.
I could only make it work with a pretty dirty workaround like this in column1.php:
<?php $this->beginContent('//../modules/admin/views/layouts/main'); ?> <?php echo $content; ?> <?php $this->endContent(); ?>
Not sure, if we should consider this a bug. Or am i missing something obvious?