Organizing Your Controllers into Sub-folders |
[eluser]myjeep_2003[/eluser]
First of I am newbie and last time I posted here regarding database class was resolved so quickly... it is sweet... great community.......... OK now to my simple question........ I am organizing my views separate folder as per the manual application/controllers/products/shoes.php To call the above controller your URI will look something like this: example.com/index.php/products/shoes/show/123 Now I have similar thing.......... application/controllers/usr_mgt/register.php so I should be calling the controller like example.com/index.php/usr_mgt/register??? I tried to hit the URL example.com/index.php/usr_mgt/register I tried to hit the URL example.com/index.php/usr_mgt/register/show/123 but No luck.....What am I doing wrong??? But question is what *******/shoes/show/123 ***** DOOO??.... Say if I have several controller in application/controllers/usr_mgt/ how do I call them?? Thanks a lot........
[eluser]Anraiki[/eluser]
Shouldn't your view files go into the view folder? Not the controller?
[eluser]myjeep_2003[/eluser]
Yes view files are in View folder.. Here is my register controller............ /* Loading the View */ $this->load->view('/header/header', $data); $this->load->view('/content/Registration'); $this->load->view('/footer/footer'); My register controller is in application/controllers/usr_mgt/register.php
[eluser]Anraiki[/eluser]
Hey Jeep, IO found a similar topic: http://ellislab.com/forums/viewthread/104933/ With a person who wants sub folder in his controller folder, they say it may be a bug, but I can't confirm it.
[eluser]TheFuzzy0ne[/eluser]
[quote author="myjeep_2003" date="1234135623"]So this is bug and no fix in sight???[/quote] No, it's not a bug. If anything it's an oversight. Nothing is broken, it's just behaviour that's not documented. |
Welcome Guest, Not a member yet? Register Sign In |