Sub controller can not find appropriate view

Hi

I want to use Simple-Subcontrollers example here: https://github.com/phalcon/mvc#phalcon-mvc-examples

I have a sub directory name 'admin' and a controller named 'FmController'.

The problem is when i browsing /sample/admin/fm, the dispatcher find FmController but it looking in /views/fm/index.phtml instead of /views/admin/fm/index.phtml.



61.0k

i dont think there is a thing "sub controller" in phalcon as far as i know

edited Sep '16

here it is https://github.com/phalcon/mvc#simple-subcontrollers

i dont think there is a thing "sub controller" in phalcon as far as i know



61.0k
edited Sep '16

they extend Phalcon\Mvc\Controller; which is the same, you can put your controllers in /toto dir fi you want they will still be controllers :D . But maybe i am wrong, doesnt matter as you can see here those sub-controllers actually change the views directory so that your logic can work

Did you do that ?