mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
Template类改进layout方法
This commit is contained in:
@@ -229,9 +229,10 @@ class Template
|
||||
* 设置布局
|
||||
* @access public
|
||||
* @param mixed $name 布局模板名称 false 则关闭布局
|
||||
* @param string $replace 布局模板内容替换标识
|
||||
* @return object
|
||||
*/
|
||||
public function layout($name)
|
||||
public function layout($name, $replace = '')
|
||||
{
|
||||
if (false === $name) {
|
||||
// 关闭布局
|
||||
@@ -243,6 +244,9 @@ class Template
|
||||
if (is_string($name)) {
|
||||
$this->config['layout_name'] = $name;
|
||||
}
|
||||
if (!empty($replace)) {
|
||||
$this->config['layout_item'] = $replace;
|
||||
}
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user