mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
Update {block} {extends} test
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1 +1 @@
|
||||
{block name='title'}Default Title{/block}
|
||||
{block name='b'}(parent|b)content {$parent} b(parent|/b){/block}
|
||||
|
@@ -1,2 +1,2 @@
|
||||
{extends file='002_parent.tpl'}
|
||||
{block name='title'}Page Title{/block}
|
||||
{block name='b'}(child|b)content {$child} b(child|/b){/block}
|
@@ -1,2 +1,2 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='title'}Default Title{/block}
|
||||
{block name='b'}(parent|b)content {$parent} b(parent|/b){/block}
|
@@ -0,0 +1,2 @@
|
||||
{extends file='003_parent.tpl'}
|
||||
{block name='b' prepend}(child|b)content {$child} b(child|/b){/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='003_parent.tpl'}
|
||||
{block name='title' prepend}prepend - {/block}
|
@@ -0,0 +1,2 @@
|
||||
{extends file='003_child.tpl'}
|
||||
{block name='b' prepend}(grand|b)content {$grand} b(grand|/b){/block}
|
@@ -1,2 +1,3 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='title'}Default Title{/block}
|
||||
{block name='b'}(parent|b)content {$parent} b(parent|/b){/block}
|
||||
|
||||
|
@@ -0,0 +1,2 @@
|
||||
{extends file='004_parent.tpl'}
|
||||
{block name='b' append}(child|b)content {$child} b(child|/b){/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='004_parent.tpl'}
|
||||
{block name='title' append} - append{/block}
|
@@ -0,0 +1,2 @@
|
||||
{extends file='004_child.tpl'}
|
||||
{block name='b' append}(grand|b)content {$grand} b(grand|/b){/block}
|
@@ -0,0 +1,2 @@
|
||||
{extends file='004_child.tpl'}
|
||||
{block name='b' append prepend}(grand|b)content {$grand} b(grand|/b){/block}
|
@@ -1,2 +1,2 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='title'}Default Title{/block}
|
||||
{block name='b'}(parent|b)content {$parent} b(parent|/b){/block}
|
@@ -0,0 +1,2 @@
|
||||
{extends '005_parent.tpl'}
|
||||
{block 'b' append}(child|b)content {$child} b(child|/b){/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='005_parent_shorttag.tpl'}
|
||||
{block 'title' append} - append{/block}
|
@@ -0,0 +1,2 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block 'b'}(parent|b)content {$parent} b(parent|/b){/block}
|
@@ -1,2 +0,0 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
<h1>{block 'title'}Default Title{/block}</h1>
|
@@ -0,0 +1,2 @@
|
||||
{extends file='006_parent.tpl'}
|
||||
{block name='b'}(child|b)content {$child} b(child|/b){/block}
|
@@ -1,3 +0,0 @@
|
||||
{extends file='006_parent_smartychild.tpl'}
|
||||
{block name='title'}child text{/block}
|
||||
|
@@ -0,0 +1,2 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='b'}(parent|b)content {$smarty.block.child} b(parent|/b){/block}
|
@@ -1,2 +0,0 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='title'}here is >{$smarty.block.child}< included{/block}
|
@@ -0,0 +1,2 @@
|
||||
{extends file='007_parent.tpl'}
|
||||
{block name='b'}(child|b)content {$smarty.block.parent} b(child|/b){/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='007_parent.tpl'}
|
||||
{block name='title'}parent block {$smarty.block.parent} is here{/block}
|
@@ -0,0 +1,2 @@
|
||||
{extends file='007_child.tpl'}
|
||||
{block name='b'}(grand|b)content {$smarty.block.parent} b(grand|/b){/block}
|
@@ -1,2 +1,2 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='title'}Default Title{/block}
|
||||
{block name='b'}(parent|b)content {$parent} b(parent|/b){/block}
|
||||
|
@@ -0,0 +1,2 @@
|
||||
{extends file='008_parent.tpl'}
|
||||
{block name='b'}(child|b)content {'escaped <text>'|escape} {$child} {counter start=1} b(child|/b){/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='008_parent.tpl'}
|
||||
{block name='title'}{'escaped <text>'|escape} {counter start=1}{/block}
|
@@ -1,2 +1,2 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='title'}Default Title{/block}
|
||||
{block name='b'}(parent|b)content {$parent} b(parent|/b){/block}
|
@@ -0,0 +1,2 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='b'}(parent|b)content {block name='c'}(parent|c)content {$parent} c(parent|/c){/block} b(parent|/b){/block}
|
@@ -1,2 +0,0 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='title'}Title with {block name='title_content'}-default-{/block} here{/block}
|
@@ -0,0 +1,2 @@
|
||||
{extends file='010_parent.tpl'}
|
||||
{block name='c'}(parent|c)content {$child} c(parent|/c){/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='010_parent_nested.tpl'}
|
||||
{block name='title_content'}-content from child-{/block}
|
@@ -0,0 +1,2 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='b'}(parent|b)content {block name='c'}(parent|c)content {$parent} c(parent|/c){/block} b(parent|/b){/block}
|
@@ -1,2 +0,0 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='title'}Title with {block name='title_content'}-default-{/block} here{/block}
|
@@ -0,0 +1,12 @@
|
||||
{extends file='011_parent.tpl'}
|
||||
{strip}
|
||||
{block name='b'}(child|b)content
|
||||
{block name='c'}(child|c)content
|
||||
{block name='n'}(child|n)content
|
||||
{include file='011_include.tpl'}
|
||||
n(child|/n)
|
||||
{/block}
|
||||
c(child|/c)
|
||||
{/block}
|
||||
b(child|/b)
|
||||
{/block}
|
@@ -1,4 +0,0 @@
|
||||
{extends file='011_parent_nested_include.tpl'}
|
||||
{block name='body'}
|
||||
{block name='title_content'}{block name='nested'}{include file='helloworld.tpl'}{/block}{/block}
|
||||
{/block}
|
@@ -0,0 +1,5 @@
|
||||
{extends file='011_child.tpl'}
|
||||
{strip}
|
||||
{block name='c' append}
|
||||
(grand|c)content {$grand} c(grand|\c)
|
||||
{/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='011_child_nested_include.tpl'}
|
||||
{block name='title_content' append} some content {/block}
|
@@ -0,0 +1 @@
|
||||
(include)content {$child} i(/include)
|
@@ -0,0 +1,2 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='b'}(parent|b)content {$parent} b(parent|/b){/block}
|
@@ -1,2 +0,0 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='body'}-default-{/block}
|
@@ -1,2 +1,2 @@
|
||||
{extends file='012_parent.tpl'}
|
||||
{block name='title'}Page Title{/block}
|
||||
{block name='c' prepend}(child|c)content {$child} c(child|/c){/block}
|
@@ -0,0 +1,2 @@
|
||||
{extends file='012_child.tpl'}
|
||||
{block name='b'}(grand|b)content {block name='c'}(grand|c)content c(grand|\c){/block} b(grand|/b){/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='012_child.tpl'}
|
||||
{block name='title'}Grandchild Page Title{/block}
|
@@ -0,0 +1,2 @@
|
||||
{extends file='012_grand.tpl'}
|
||||
{block name='c' prepend}(grandgrand|c)content c(grandgrand|\c){/block}
|
@@ -1,2 +1,2 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='title'}Default Title{/block}
|
||||
{block name='b'}(parent|b)content {$parent} b(parent|/b){/block}
|
||||
|
@@ -1,2 +0,0 @@
|
||||
{extends file='013_parent.tpl'}
|
||||
{block name='title' prepend}child prepend - {/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='013_2_child_prepend.tpl'}
|
||||
{block name='title' prepend}grandchild prepend - {/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='013_parent.tpl'}
|
||||
{block name='title'}child{/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='013_child.tpl'}
|
||||
{block name='title' prepend}grandchild prepend - {/block}
|
@@ -1,2 +0,0 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='title'}parent{/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='014_parent.tpl'}
|
||||
{block name='title'}child title with - {$smarty.block.child} - here{/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='014_child_smartychild.tpl'}
|
||||
{block name='title'}grandchild content{/block}
|
@@ -1,2 +0,0 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='title'}Default Title{/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='015_parent.tpl'}
|
||||
{block name='title'}Page Title{/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='015_child.tpl'}
|
||||
{block name='title' append} - grandchild append{/block}
|
@@ -1,2 +0,0 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='title'}Default Title{/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='016_parent.tpl'}
|
||||
{block name='title'}child title with {block name='title_content'}-default-{/block} here{/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='016_child_nested.tpl'}
|
||||
{block name='title_content'}-grandchild content-{/block}
|
@@ -1,2 +0,0 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='title'}Default Title{/block}
|
@@ -1,6 +0,0 @@
|
||||
{extends file='017_parent.tpl'}
|
||||
{block name='content1'}
|
||||
{block name='content2'}
|
||||
child pre {$smarty.block.child} child post
|
||||
{/block}
|
||||
{/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='017_child_nested.tpl'}
|
||||
{block name='content2'}-grandchild content-{/block}
|
@@ -1,2 +0,0 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='content1'}Default content{/block}
|
@@ -0,0 +1,9 @@
|
||||
{extends file="018_parent.tpl"}
|
||||
{strip}
|
||||
{block name='b'}(child|b)content
|
||||
{block name='c'}(child|c)content child c(child|/c)
|
||||
{/block}
|
||||
{block name='d' hide}(child|d)content {$smarty.block.child} d(child|/d)
|
||||
{/block}
|
||||
b(child|/b)
|
||||
{/block}
|
@@ -1,12 +0,0 @@
|
||||
{extends file="018_parent_nested.tpl"}
|
||||
|
||||
{block name="index"}
|
||||
{block name="test2"}
|
||||
nested block.
|
||||
{$smarty.block.child}
|
||||
{/block}
|
||||
{block name="test" hide}
|
||||
I should be hidden.
|
||||
{$smarty.block.child}
|
||||
{/block}
|
||||
{/block}
|
@@ -0,0 +1,6 @@
|
||||
{extends file="018_child.tpl"}
|
||||
{strip}
|
||||
{block name='c' hide}(grand|c)content {$smarty.block.child} c(grand|/c)
|
||||
{/block}
|
||||
{block name='d'}(grand|d)content grand d(grand|/d)
|
||||
{/block}
|
@@ -0,0 +1,6 @@
|
||||
{extends file="018_grand.tpl"}
|
||||
{strip}
|
||||
{block name='c'}(grandgrand|c)content grandgrand c(grandgrand|/c)
|
||||
{/block}
|
||||
{block name='d'}(grandgrand|d)content grandgrand d(grandgrand|/d)
|
||||
{/block}
|
@@ -0,0 +1,2 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='b'}(parent|b)content parent b(parent|/b){/block}
|
@@ -1,2 +0,0 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='index'}{/block}
|
@@ -1,12 +0,0 @@
|
||||
{ extends file="019_parent.tpl" }
|
||||
|
||||
{ block name="index" }
|
||||
{ block name="test2" }
|
||||
nested block.
|
||||
{ $smarty.block.child }
|
||||
{ /block }
|
||||
{ block name="test" hide }
|
||||
I should be hidden.
|
||||
{ $smarty.block.child }
|
||||
{ /block }
|
||||
{ /block }
|
@@ -1,2 +0,0 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{block name='index'}{/block}
|
@@ -1,5 +1,5 @@
|
||||
{extends file='020_include_parent.tpl'}
|
||||
|
||||
{block name="p"}page 1<br>{/block}
|
||||
{block name="p"}(include1|p)content 1 p(include1|\p){/block}
|
||||
|
||||
{block name="b"}block 1<br>{/block}
|
||||
{block name="b"}(include1|b)content 1 b(include1|\b){/block}
|
@@ -1,5 +1,5 @@
|
||||
{extends file='020_include_parent.tpl'}
|
||||
|
||||
{block name="p"}page 2<br>{/block}
|
||||
{block name="p"}(include2|p)content 2 p(include2|\p){/block}
|
||||
|
||||
{block name="b"}block 2<br>{/block}
|
||||
{block name="b"}(include2|b)content 2 b(include2|\b){/block}
|
@@ -1,5 +1,5 @@
|
||||
{extends file='020_include_parent.tpl'}
|
||||
|
||||
{block name="p"}page 3<br>{/block}
|
||||
{block name="p"}(include3|p)content 3 p(include3|\p){/block}
|
||||
|
||||
{block name="b"}block 3<br>{/block}
|
||||
{block name="b"}(include3|b)content 3 b(include3|\b){/block}
|
@@ -1,3 +1,4 @@
|
||||
{strip}
|
||||
{block name="p"} {/block}
|
||||
{block name='dummy'}
|
||||
{include file='020_include_subtemplate.tpl'}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
test:{$test nocache} compiled:# rendered:{$test}
|
||||
{include file='020_include_1.tpl'}
|
||||
{include file='020_include_2.tpl'}
|
||||
{include file='020_include_3.tpl'}
|
||||
(include1){include file='020_include_1.tpl'}(\include1)
|
||||
(include2){include file='020_include_2.tpl'}(\include2)
|
||||
(include3){include file='020_include_3.tpl'}(\include3)
|
||||
|
||||
|
@@ -1,2 +1,2 @@
|
||||
{extends file='021_parent.tpl'}
|
||||
{block name='title'}Page Title{/block}
|
||||
{block name='b' prepend}(child|b)content {$child} b(child|/b){/block}
|
||||
|
@@ -0,0 +1,2 @@
|
||||
{extends file='021_child.tpl'}
|
||||
{block name='b' prepend}(grand|b)content {$grand} b(grand|/b){/block}
|
@@ -1,2 +0,0 @@
|
||||
{extends file='021_child.tpl'}
|
||||
{block name='title'}Grandchild Page Title{/block}
|
@@ -1 +1 @@
|
||||
{block name='title'}Default Title{/block}
|
||||
{block name='b'}(parent|b)content {$parent} b(parent|/b){/block}
|
Reference in New Issue
Block a user