thinkphp3.2的模板渲染LAYOUT_ON,特定文件不加载公共文件

来源:互联网 发布:scientific linux 吧 编辑:程序博客网 时间:2024/06/05 08:38
'LAYOUT_ON'=>true,//开启模板渲染

'LAYOUT_NAME'=>'layout',//在tpl根目录下建立layout.html

<include file="Public:header" />

{__CONTENT__}

<include file="Public:footer" />

若想要某个页面不加载公共的header,footer,在模板页面加入{__NOLAYOUT__}即可。

0 0
原创粉丝点击