Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to properly and correctly use volt architecture "Multi Module"

I try to do so but refuses to work templating

// Register the installed modules
$application->registerModules(
    array(
        'frontend' => function($di) use ($view) {
            $di->setShared('view', function() use ($view) {
                $view->setViewsDir('../apps/frontend/views/');
                $view->registerEngines(array(
                        ".volt" => 'Phalcon\Mvc\View\Engine\Volt'
                 ));
                return $view;
            });
        },
        'backend' => function($di) use ($view) {
            $di->setShared('view', function() use ($view) {
                $view->setViewsDir('../apps/frontend/views/');
                $view->registerEngines(array(
                     ".volt" => 'Phalcon\Mvc\View\Engine\Volt'
                ));
                return $view;
            });
        }
    )
);


84.1k
Accepted
answer


7.8k

well, my carelessness