mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Fix #158
This commit is contained in:
@ -6,7 +6,8 @@ require_once __DIR__.'/../tests/tools.php';
|
||||
\Fenom::registerAutoload();
|
||||
|
||||
$fenom = Fenom::factory(__DIR__.'/templates', __DIR__.'/compiled');
|
||||
$fenom->setOptions(Fenom::AUTO_RELOAD);
|
||||
var_dump($fenom->compileCode('{set $z = "A"~~"B"}')->getBody());
|
||||
//$fenom->display("blocks/second.tpl", []);
|
||||
$fenom->setOptions(Fenom::AUTO_RELOAD | Fenom::FORCE_COMPILE);
|
||||
//var_dump($fenom->compileCode('{set $z = "A"~~"B"}')->getBody());
|
||||
//var_dump($fenom->compile("bug158/main.tpl", [])->getTemplateCode());
|
||||
var_dump($fenom->display("bug158/main.tpl", []));
|
||||
// $fenom->getTemplate("problem.tpl");
|
3
sandbox/templates/bug158/main.tpl
Normal file
3
sandbox/templates/bug158/main.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
{* Отображаемый шаблон *}
|
||||
{import [test] from "bug158/test.tpl" as test}
|
||||
{test.test}
|
7
sandbox/templates/bug158/test.tpl
Normal file
7
sandbox/templates/bug158/test.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
{* template:test.tpl *}
|
||||
{macro test($break = false)}
|
||||
Test macro recursive
|
||||
{if $break?}
|
||||
{macro.test break = true}
|
||||
{/if}
|
||||
{/macro}
|
Reference in New Issue
Block a user