Closed designbydc closed 7 years ago
Kirby’s tpl::load
will only load PHP scripts.
But you should be able to use the twig()
helper function instead. See the README:
https://github.com/fvsch/kirby-twig#rendering-a-template-in-php-the-twig-helper
I've tried just the twig() helper function but I get the error "Call to undefined function twig()". I also register the Twig Plugin first with Kirby\Twig\Plugin::register(); but than I get a 500 error.
See my answer on the kirby forum: https://forum.getkirby.com/t/how-to-set-twig-files-in-template-loader/7866/7?u=fvsch
Hi,
is it possible to load or pass twig templates with the tpl::load() function?
Of course this doesn't works because the file will not be rendered! Maybe someone can help me please or can show me another solution?