Skip to content

Instantly share code, notes, and snippets.

View shiftsave's full-sized avatar

Ivan Cruz shiftsave

View GitHub Profile
<?php
kirby::$handlers['template'] = function($kirby, $page, $data = array()) {
require_once(__DIR__ . DS . 'vendor' . DS . 'autoload.php');
$loader = new Twig_Loader_Filesystem($kirby->roots()->templates());
$twig = new Twig_Environment($loader, array(
'cache' => false
));