Welcome Guest, Not a member yet? Register   Sign In
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, 04:54 AM
another controller within a controller? - by El Forum - 08-29-2010, 05:58 AM
another controller within a controller? - by El Forum - 08-29-2010, 06:09 AM
another controller within a controller? - by El Forum - 08-29-2010, 06:49 AM
another controller within a controller? - by El Forum - 08-29-2010, 08:57 AM
another controller within a controller? - by El Forum - 08-29-2010, 01:20 PM
another controller within a controller? - by El Forum - 08-29-2010, 05:06 PM
another controller within a controller? - by El Forum - 08-29-2010, 07:30 PM
another controller within a controller? - by El Forum - 08-29-2010, 09:41 PM
another controller within a controller? - by El Forum - 08-30-2010, 07:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB