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

Rendering a view file

Hey everyone,

I have a controller in it I save data to the database and I have it passing variables to a view with

      $this->view->setVars(array(
            'msg' => $msg,
            'action' => $action
        ));

and I am picking the view file like

    $this->view->pick('beta/signUp.phtml');

However the view is not being loaded.

Any ideas? The views have been loading fine else where, and I would like to avoid a simple black text on white screen.

Thanks!

edited Oct '14

Try to pick view without extension:

$this->view->pick('beta/signUp');

If it'll not help look at server errors.

Awesome that worked thanks!