I was setting Volt in my app and I cannot get my first action view 'cause it cannot find the base template. The paths are correct, and in a terminal the file exists within the paths given. It just doesn't makes sense:
index.php
$ID->set('view', function()
{
$vista = new View();
$vista->setViewsDir('../vistas/');
$vista->registerEngines(
[
'.volt' => 'Phalcon\Mvc\View\Engine\Volt',
'.phtml' => function ($vista, $ID)
{
$volt = new Volt($vista, $ID);
$volt->setOptions(
[
'compileAlways' => true,
'compiledPath' => function ($rutaCompilada)
{
// This function isn't the problem, I tested.
$nombres = explode('/', $rutaCompilada);
return (
'../vistas/compiladas/' .
$nombres[count($nombres) - 2] .
'-' .
$nombres[count($nombres) - 1] .
'.compiled'
);
}
]);
return $volt;
}
]);
return $vista;
});