another controller within a controller?

#7
[eluser]drophere[/eluser]
[quote author="J Maxwell" date="1283127621"]Your problem is that in your route you aren't defining the $3 - so that when you add the method onto the URI then it is no longer matching your route.

Try adding another route, with a third (:any) in it.

John[/quote]

Hi John,

Thanks for your reply.

I realised it when I mentioned about the another (:any) line in my very last post, but when I do this it will break when the third segment is not introduced. (That means, URI without 3rd segment does not work, but instead shows 404 error)

Further more the problem is that I cannot have a pre-set amount of routing arguments in the routes.php, as the segments at the longest will vary from one controller to another.

I also realised that as soon as I reroute using routes.php it will end up there at the exact point where its routed, and won't follow the CI's default controller/method rule anymore.

Hmm.. I better study on this before I hit the Modular CI's door.


Messages In This Thread
another controller within a controller? - by El Forum - 08-29-2010, 05:54 AM
another controller within a controller? - by El Forum - 08-29-2010, 06:58 AM
another controller within a controller? - by El Forum - 08-29-2010, 07:09 AM
another controller within a controller? - by El Forum - 08-29-2010, 07:49 AM
another controller within a controller? - by El Forum - 08-29-2010, 09:57 AM
another controller within a controller? - by El Forum - 08-29-2010, 02:20 PM
another controller within a controller? - by El Forum - 08-29-2010, 06:06 PM
another controller within a controller? - by El Forum - 08-29-2010, 08:30 PM
another controller within a controller? - by El Forum - 08-29-2010, 10:41 PM
another controller within a controller? - by El Forum - 08-30-2010, 08:33 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.