I just want to disable layout from layout/main.volt for some controllers but have no idea, please help
https://docs.phalcon.io/en/latest/reference/views.html#control-rendering-levels
public function afterExecuteRoute($dispatcher) { $this->view->setRenderLevel( View::LEVEL_LAYOUT ); }
Can also specify the layout in the initialize method of the controller.
public function initialize() { $this->view->setTemplateAfter('path/to/layout'); }
Thanks a lot, Zach, Izo :D