views:

31

answers:

1

Hi, in my current project ive a controller tree like this:

Controller -
------Admin -
------------user.php
------otherClass.php

Where controller and admin are folder and user and otherClass are the classes.
If i want to call any otherClass method the url would be this one:

example.com/otherClass

But when i try to call the users methods like this:

example.com/admin/user

i get this : Class controller_admin does not exist (whats logical), so i tried with the routs in the bootstrap.php and after many failed tries, i gave up and decided to ask you guys :P .

The question is how should i code the route::set to make this work.
Thanks

A: 

First thing is that you must set 'index_file' key to FALSE in bootstrap (when Kohana::init() is being called).

Leave the default route as it is ( it's controller/action/id, with controller and action being 'index' by default).

For more informations take a look at kohana 3 routing basics article

Kemo
ive read it before, but i couldn find info about using directories in the route
ChrisZ
Directories are dependant to class names, not routes. controller/admin/forum.php referrs to controller_admin_forum class name or /admin_forum as URI
Kemo
OHh yeah i was naming wrong the controller, thanks!!!.
ChrisZ