another controller within a controller?

#1
[eluser]drophere[/eluser]
Hi,

I have problem making my small idea come true.

I have a controller called 'user', which then takes the second segment as an user id so it's like

http://codeigniter/index.php/user/username

(Yes, I remapped it since the second segment, username, isn't a static method. If concerned, it's really /user/is_user/username)

The problem after that is I want to put another controller after this..
Say I've built controllers, models, views for these: blog, photo, guestbook, about

then I want them to come after that username in the URI. so it'd be like

http://codeigniter/index.php/user/username/blog/methods for the controller blog/

Is it possible to design like this?

I understand that I can put everything in the user controller which kinda acts like a parent controller,
but then that'd be not taking advantage of MVC pattern. No it's not even that far. That'd be a improper way to design a program. I reckon..


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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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