LightnCandy option: FLAG_PARENT

Support {{..}} or {{../foo}} in template. Otherwise, {{..}} or {{../foo}} will cause template error.

Sample Codes

Error when compile {{..}}

Used option: FLAG_ERROR_LOG

Data:
NULL
Template:
{{../foo}}OK
Result:
Command failed: php .exec_tmp_file2>&1
Source Code
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

Data:
NULL
Template:
{{../foo}}OK
Result:
OK
Source Code
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);

See Also...