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

Can I rename filename of a view to xxx-xxx.volt?

As title, I have an action justTestAction(), I want to rename filename of this view to just-test. Is that possible?



93.7k
Accepted
answer
edited Feb '16

You can use pick() method to select any view you want. Example:

$this->view->pick(array('templates/test-test-test'));

Notice that pick accepts array() for parameter!