A
A
Alexey Prikazchikov2016-03-24 10:07:14
PHP
Alexey Prikazchikov, 2016-03-24 10:07:14

Current Phalcon controller in Volt, how to determine?

Is it possible to define in a template? Or just pass it to a variable?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
My joy, 2016-04-03
@alexprik07

{{ router.getControllerName() }}
{{ router.getActionName() }}

or
{{ dispatcher.getControllerName() }}
{{ dispatcher.getActionName() }}

router/dispatcher in this case is the name of the services that you set in DI. If you have it named somehow differently, then indicate it correctly in the template. In general, in Volt, you can refer to any services from DI by name in this way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question