Kohana3 Route with Subdirectories in Controller Folder
Posted
by ahmet2106
on Stack Overflow
See other posts from Stack Overflow
or by ahmet2106
Published on 2010-05-28T16:14:33Z
Indexed on
2010/05/28
16:32 UTC
Read the original article
Hit count: 497
Hello everybody
I'm using Kohana for so long, but the new Version is a litte bit other.
My problem with an example:
classes/
controller/
pages.php
pages/
imprint.php
I want to change my Route so, that if i call domain.tld/pages, the pages.php should called with action_index(). But if i call domain.tld/pages/imprint, pages/imprint.php should called with action_index() (and this should work too: pages/imprint/demo -> action_demo() in pages/imprint.php)
Tried this with bootstrap and http://kohanaframework.org/guide/api/Route this examples, but cant get it work. How can i make this? Any help?
Thanks
Closed: was my fault
The Route::set('pages'...) must be before Route::set('default'...);
© Stack Overflow or respective owner