Closed MHaendel closed 10 years ago
This is the fix:
$app['twig'] = $app->share($app->extend('twig', function($twig, $app) {
$twig->addExtension(new \nymo\Twig\Extension\BreadCrumbExtension($app));
return $twig;
}));
Thanks for that haven't had this issue in my projects but it makes sense to use this extension as a shared service. Will update the docs tomorrow.
When I change a Template and reload it the first time, I get this:
Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("Unable to register extension "renderBreadCrumbs" as extensions have already been initialized.") in "layout.html" at line 225.
After a reload it's okay and works. Sometimes this happens randomly