//视图输出字符串内容替换
'view_replace_str' => [
'__PUBLIC__' => '/public/',
'__ROOT__' => '/',
],

模板设置:
template下添加:
'layout_on' => true,
'layout_name' => 'layout',
'layout_item' => '[__REPLACE__]'

同时layout.html改为[__REPLACE__]
{include file="templet/header" /}
[__REPLACE__]
{include file="templet/footer" /}

或者layout.html
{include file="templet/header" /}
{__CONTENT__}
{include file="templet/footer" /}
另外在使用index.html中加
{layout name="layout" /}
文件中开头定义 layout 标签 ,表示当前模板使用了布局,布局模板文件为 layout.html ,
布局模板中的 {__CONTENT__} 会自动替换为解析后的index.html内容。
posted on 2017-08-18 16:28  BBDN  阅读(420)  评论(0编辑  收藏  举报