Support {{..}}
or {{../foo}}
in template. Otherwise, {{..}}
or {{../foo}}
will cause template error.
Error when compile {{..}}
Used option: FLAG_ERROR_LOG
NULL
OK
Do not support
, you should do compile with LightnCandy::FLAG_PARENT flag
require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "{{../foo}}OK";
$php = LightnCandy::compile($template, array(
"flags" => LightnCandy::FLAG_ERROR_LOG
));
Enable handlebars.js extension {{..}}
Used option: FLAG_PARENT
NULL
OK
OK
require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "{{../foo}}OK";
$php = LightnCandy::compile($template, array(
"flags" => LightnCandy::FLAG_PARENT
));
$render = LightnCandy::prepare($php);
$data = NULL;
echo $render($data);