We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

VOLT load only main index without layout and action

Hi, after i changed apache to nginx, some view don't loading.

If i try get (https://localhost/user/index) - it's ok But if i try get (https://localhost/user/notify/index) - volt load only main index without layout and action.

What's wrong? It's my nginx config

Thanks



58.4k
edited Dec '14

Hey

In url (https://localhost/user/notify/index) what is action ? if is action is notify then The view in volt automatic loading is folder {root}/views/user/notify.volt

Root application of you is /var/www/html/ yet ?



10.0k

Thanks Thien! Notify it's a page, it's not action notify, it's a manager for user notification. Another controller too not work correctly. I don't set any option for volt (i.e $this->view->disable() or another method like setRenderLevel(View::LEVEL_*))



10.0k

Root application of you is /var/www/html/ yet ?

Yes



58.4k

I think you should setup router for it, for example

    $router = new Phalcon\Mvc\Router(false);

    $router->add(
        '/user/notify',
        array(
           'controller' => 'user', // do some you like
           'action'     => 'index'// do some you like
        )
    );


10.0k

No, problem in configuration i guess. Now i install apache and this works fine.



10.0k
edited Dec '14

Ahhrrrr... Heellp somebody:)

    If use this, all works fine, but why volt don't work correct??
    $this->view->pick("layouts/notify");
    $this->view->pick("notify/index");

Thien dispatcher founded controller and action, and routes matched, but volt ...