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

Phalcon not rendering right volt file when using pick

Hi,

I have the following controller: AboutController in the indexAction I have: $this->view->pick('about'); and in views I have about.volt file but the index.volt is still being rendered. I want all the volt files in top level view folder ie.

views/about 
views/contact

and not like this:

views/about/index
views/contact/index

Thanks

Per Definition Phalcon is looking for you about.volt here: First is your views directory, second is the matched controller and third the action within the controller.

    views/about/about.volt

if you want to change this behavior read the docs: https://docs.phalcon.io/3.4/en/views