Thanks! I have just installed the plugin and all template files are create with twig. But my question is how i load twig template with this function.
Here is a example code where i call the tpl::load function:
array(
'pattern' => array('(:any)/(:any)/details/(:any)'),
'action' => function($i18n, $section, $details) {
$items_section = site()->visit($section, $i18n)->children()->visible();
$items_topic = $items_section->children()->findBy('slug', $details);
if ( isset($items_topic) && !empty($items_topic) ){
tpl::$data = array_merge(tpl::$data, array(
'kirby' => kirby(),
'site' => site(),
'pages' => pages(),
'page' => $items_topic
), $items_topic->templateData());
echo tpl::load( kirby()->roots()->templates() . DS . 'sometemplate.php');
}
},
'method' => 'GET'
)
But I need to load “sometemplate.twig” in the tpl::load() function.
Maybe someone has an idea how I can realize that? Is this possible?