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

get controller name, action name

Hi all, how to get controller name, and action name in volt view , in codeigniter i can use: $this->uri->segment(1), or $this->router->fetch_class() and $this->router->fetch_method().

thanks!



98.9k
Accepted
answer

Controller Name:

{{ dispatcher.getControllerName() }}

Action Name:

{{ dispatcher.getActionName() }}