Redirecting front-end routes to Dashboard in Bolt CMS -


i'm trying redirect front end routes admin dashboard, i'm using bolt installation rest api end. here's how i'm routing content:

contentlink:   path:               /{contenttypeslug}/{slug}   defaults:           { _controller: 'bolt\controllers\backend::dashboard' }   requirements:     contenttypeslug:  'bolt\controllers\routing::getanycontenttyperequirement' 

so, i've done use dashboard controller. when try visit 1 of routes, following whoops error:

twig_error_loader template "dashboard/dashboard.twig" not defined () 

so reason it's not looking in correct place template. there way correct this?

this looks it's twig path setup differently depending on whether there frontend or backend request.

you can add path twig environment bolt uses following call:

$app['twig.loader.filesystem']->prependpath("/path/to/twig"); 

the path backend twig templates may vary work.

$path = $app['resources']->getpath('app/view/twig'); $app['twig.loader.filesystem']->prependpath($path); 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -