I have and app using volt template Engine, When I access using only the url as domain name (domain.com) it doesnt show the index page, I need to add the domain.com/index to show it: here is my view dependecy injector service:
$di->set('view', function() use ($config) {
$view = new View();
$view->setViewsDir(__DIR__.$config->myapp->viewsDir);
$view->registerEngines(array(
'.volt' => function($view, $di) use ($config) {
$volt = new Volt($view, $di);
$volt->setOptions(array(
'compiledPath' => __DIR__.$config->myapp->cacheDir,
'compiledSeparator' => '_',
'stat' => true,
'compileAlways' => true
));
return $volt;
},
'.phtml' => '\Phalcon\Mvc\View\Engine\Php'
));
return $view;
}, true);
and my views folder is listing like:
views
->about
->index.volt
->index
->index.volt
->index.volt
In the main index.volt I have {{ content() }}. What Im missing?