mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
修正block标签嵌套时外层不能正确替换的问题;
This commit is contained in:
@@ -1,11 +1,4 @@
|
||||
{layout name="layout" replace="[__REPLACE__]" /}
|
||||
<div>
|
||||
{include file="include" name="$info.name" value="$info.value" /}
|
||||
{block name="main"}
|
||||
main
|
||||
{/block}
|
||||
{literal}
|
||||
{$name}
|
||||
{/literal}
|
||||
<?php echo 'php code'; ?>
|
||||
</div>
|
||||
{extend name="extend2" /}
|
||||
{block name="mainbody"}
|
||||
mainbody
|
||||
{/block}
|
||||
16
tests/thinkphp/library/think/extend2.html
Normal file
16
tests/thinkphp/library/think/extend2.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{layout name="layout" replace="[__REPLACE__]" /}
|
||||
<div>
|
||||
{include file="include" name="info" value="$info.value" /}
|
||||
{block name="main"}
|
||||
{block name="side"}
|
||||
side
|
||||
{/block}
|
||||
{block name="mainbody"}
|
||||
|
||||
{/block}
|
||||
{/block}
|
||||
{literal}
|
||||
{$name}
|
||||
{/literal}
|
||||
<?php echo 'php code'; ?>
|
||||
</div>
|
||||
@@ -255,7 +255,7 @@ EOF;
|
||||
|
||||
$content = <<<EOF
|
||||
{extend name="extend" /}
|
||||
{block name="main"}
|
||||
{block name="side"}
|
||||
{include file="include" name="\$user.name" value="\$user.account" /}
|
||||
{\$message}{literal}{\$message}{/literal}
|
||||
{/block}
|
||||
@@ -263,12 +263,17 @@ EOF;
|
||||
$data = <<<EOF
|
||||
<nav>
|
||||
<div>
|
||||
<input name="<?php echo \$info['name']; ?>" value="<?php echo \$info['value']; ?>">
|
||||
<input name="info" value="<?php echo \$info['value']; ?>">
|
||||
|
||||
|
||||
<input name="<?php echo \$user['name']; ?>" value="<?php echo \$user['account']; ?>">
|
||||
<?php echo \$message; ?>{\$message}
|
||||
|
||||
|
||||
mainbody
|
||||
|
||||
|
||||
|
||||
{\$name}
|
||||
|
||||
<?php echo 'php code'; ?>
|
||||
@@ -288,7 +293,7 @@ EOF;
|
||||
$_SERVER['SERVER_NAME'] = 'server_name';
|
||||
$_GET['action'] = 'action';
|
||||
$_POST['action'] = 'action';
|
||||
\think\Cookie::set('action', ['name' => 'name']);
|
||||
$_COOKIE['name'] = 'name';
|
||||
\think\Session::set('action', ['name' => 'name']);
|
||||
define('SITE_NAME', 'site_name');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user