Welcome Guest, Not a member yet? Register   Sign In
Routes, routes...
#1

[eluser]smilie[/eluser]
Hi all,

I am really having problems gasping the concept of routing in CI.

What I have is:

-application
- controllers
- subdirectory1
- controller1.php
- controller2.php
- subdirectory2
- controller3.php
- controller4.php
-controller5.php

Now, problem is:
When I link some page (a href) I do:

Code:
<a href="subdirectory1/controller1">&lt;?=$this->lang->line('admin');?&gt;</a>

This works fine. But 'somehow' CI remembers that subdirectory, so when I click other link like:

Code:
<a href="controller5">&lt;?=$this->lang->line('reports');?&gt;</a>

Then CI makes automatically "subdirectory1/controller5" from it - but it can not be found (because controller5.php is not in a subdirectory). Even worse, when I click on controller1 (above link) I get subdirectory1/subdirectory1/controller1 Sad

My Routes.php
Code:
$route['default_controller'] = "home";
$route['scaffolding_trigger'] = "";
$route['admim'] = "admin";

So - could someone (preferably with a example) point how do I achieve to use controllers in subdirectories? :-)

Thanks!
Smilie


Messages In This Thread
Routes, routes... - by El Forum - 07-20-2010, 05:04 AM
Routes, routes... - by El Forum - 07-20-2010, 05:20 AM
Routes, routes... - by El Forum - 07-20-2010, 05:25 AM
Routes, routes... - by El Forum - 07-20-2010, 05:29 AM
Routes, routes... - by El Forum - 07-20-2010, 05:33 AM
Routes, routes... - by El Forum - 07-20-2010, 05:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB