View template not load

Hey dudes!

why i can't load template room.v ?

init View:

$di->set("view", function () {

    $view = new Phalcon\Mvc\View();
        '.v' => function ($view, $di) {
            $volt = new Phalcon\Mvc\View\Engine\Volt($view, $di);
                'compiledPath' => '../app/cache/',
                'compileAlways' => true,
                'compiledSeparator' => '__',
            return $volt;

    return $view;


public function showAction() {

        $this->view->roomName = $this->dispatcher->getParam('name');


Just empty screen. No errors, no except-s.


use absolute paths to be 100% sure path is correct ( ex: /var/www/mywebsite/app/views/ )

dont foget you always need

echo $this->getContent(); 

also you could be having some syntax errors/ or jsut errors, so make sure error reporting is on and you see the errors.

There are no errors, I checked this by creating specially errors. There is something else. For some reason, a completely different template is shown.

Look at this yourself:

I was helped by:


But I'm not sure that this is the right decision. I await from you confirmation of my actions.

edited May '17

you need to check those examples how to create shared layout app



have you try wth this option ?


phil, yes, but it no effect for me

edited Jun '17

in the documentation, a single name indicates the (controller) folder and by defaut the action name is used for the file name

can you create a folder 'common' in the folder views and move templates in it

public function showAction() {

        $this->view->roomName = $this->dispatcher->getParam('name');