Closed adamkiss closed 3 years ago
The directives should be in the beebmx.kirby-blade.directives
key in the config.php
file:
'beebmx.kirby-blade.directives' => [
'gist' => function ($expression) {
return "<?php echo gist($expression); ?>";
}
],
That is not what I meant;
The default ones, like: https://github.com/beebmx/kirby-blade/blob/18db9c54b5e4514625855f30186c5e26ce25f3cc/src/Template.php#L124 don't actually work.
@esc('one', 'attr', true)
renders as
<?php echo esc('one', 'attr', true, html, ) ?>
which is obviously wrong
I wasn't able to make any of the directives Work.
Looking at the:
It seems that directives by default don't parse the $parameters, you have to do it yourself. In these cases the correct version of the e.g.
gist
directive would be:Basically, just passing the expression in the Blade Templates through.
Am I wrong?