mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
added recursive template function tests
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
{strip}
|
||||||
|
{function 'recursion1' level=0}
|
||||||
|
{$level}
|
||||||
|
{if $level < 5}
|
||||||
|
{call name=recursion1 level=$level+1}
|
||||||
|
{/if}
|
||||||
|
{/function}
|
||||||
|
|
||||||
|
{call name=recursion1}
|
||||||
|
|
||||||
|
|
||||||
|
{function 'recursion2' level=0}
|
||||||
|
<br>2 level = {$level}
|
||||||
|
{if $level < 5}
|
||||||
|
{call name=recursion2 level=$level+1}
|
||||||
|
{/if}
|
||||||
|
{/function}
|
||||||
|
|
||||||
|
{recursion2}
|
||||||
|
{/strip}
|
@@ -0,0 +1,10 @@
|
|||||||
|
{strip}
|
||||||
|
{function 'recursion2' level=0}
|
||||||
|
{$level}
|
||||||
|
{if $level < 5}
|
||||||
|
{call name=recursion2 level=$level+1}
|
||||||
|
{/if}
|
||||||
|
{/function}
|
||||||
|
|
||||||
|
{recursion2}
|
||||||
|
{/strip}
|
Reference in New Issue
Block a user