mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
修正layout解析模板
This commit is contained in:
@@ -339,7 +339,7 @@ class Template
|
||||
//解析Layout标签
|
||||
$array = $this->parseXmlAttrs($matches[1]);
|
||||
// 读取布局模板
|
||||
$layoutFile = $this->config['tpl_path'] . $array['name'] . $this->config['tpl_suffix'];
|
||||
$layoutFile = (defined('THEME_PATH') && substr_count($array['name'], '/') < 2 ? THEME_PATH : $this->config['tpl_path']) . $array['name'] . $this->config['tpl_suffix'];
|
||||
$replace = isset($array['replace']) ? $array['replace'] : $this->config['layout_item'];
|
||||
// 替换布局的主体内容
|
||||
$content = str_replace($replace, $content, file_get_contents($layoutFile));
|
||||
|
||||
Reference in New Issue
Block a user