We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

phalcon - before executing view event?

I want to execute:


before the view gets executed.

$menus is an array that can be added in different controllers.

Finally before executing the view i want to put the menus var in the view.

function afterExecuteRoute() does not do the job


I'd put it in the BaseController that's extended by all other controllers.

edited Jun '14

Or u can use the view beforeRender event.