class CustomerModule extends CWebModule
{
public function init()
{
Yii::app()->theme="customer-theme";
'customer' => array
(
//'layoutPath' => 'protected/modules/customer/views/layouts',
'layoutPath' => 'themes/customer-theme/views/layouts',
'layout' => 'main',
'defaultController' => 'Default',
'headline' => 'Модуль Пассажира',
),
<?php $this->beginContent('//layouts/main'); ?>
<div id="content">
column1
<?php echo $content; ?>
</div><!-- content -->
<?php $this->endContent(); ?>
$this->layout = '/layouts/column2';
$this->layout = '/layouts/main
То попадаю в главный шаблон модуля, но если так: $this->layout = '/layouts/main/column1
, то стили падают. Есть какие нибудь средства в Yii - проследить правильность путей? class AdminModule extends CWebModule
{
public function init()
{
$this->layout = '/layouts/main';
}
}
class DefaultController extends Controller
{
public function actionIndex()
{
$this->layout = '//layouts/column1';
$this->render('index');
}
public function actionView()
{
$this->layout = '//layouts/column2';
$this->render('index');
}
}
<?php $this->beginContent('//layouts/main'); ?>
<div id="content">
column1
<?php echo $content; ?>
</div><!-- content -->
<?php $this->endContent(); ?>
<?php $this->beginContent('//layouts/main'); ?>
<div class="span-19">
<div id="content">
column2
<?php echo $content; ?>
</div><!-- content -->
</div>
<div class="span-5 last">
<div id="sidebar">
<?php
$this->beginWidget('zii.widgets.CPortlet', array(
'title'=>'Operations',
));
$this->widget('zii.widgets.CMenu', array(
'items'=>$this->menu,
'htmlOptions'=>array('class'=>'operations'),
));
$this->endWidget();
?>
</div><!-- sidebar -->
</div>
<?php $this->endContent(); ?>