在新建了一个modules后,使用系统默认layout(就是下面的main),显示正常的。
但使用经过修改的layout,如下,则只输出$content内容,main里面上下两部分就不见了,请问如何解决呢?
<?php $this->beginContent(’/layouts/main’);?>
<div id="content">
<?php echo $content;?>
</div>
<?php $this->endContent();?>
在新建了一个modules后,使用系统默认layout(就是下面的main),显示正常的。
但使用经过修改的layout,如下,则只输出$content内容,main里面上下两部分就不见了,请问如何解决呢?
<?php $this->beginContent(’/layouts/main’);?>
<div id="content">
<?php echo $content;?>
</div>
<?php $this->endContent();?>
乱试了好久,终于出来了,改成点语法就行~
在全局layouts的home里面开头改成
<?php $this->beginContent(‘application.views.layouts.main’);?>
嗯,我也遇到这个问题了,看到你的帖子,我也解决了!谢谢楼主!