//视图输出字符串内容替换
'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内容。

相关文章:

  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
相关资源
相似解决方案