Welcome Guest, Not a member yet? Register   Sign In
[Help]How to work with controllers in separate folders
#1

[eluser]Nonox[/eluser]
I have a doubt about how to work with controllers in separate folders, part of the site is into a folder called "site/", and all this is what the users surf (the main site), the folder "admin/" have the controllers about the administration.

Well... all refer about "admin/" is OK, I navigate in this way http://localhost/admin/login .

But I dont want to navigate the main site in this way:
http://localhost/site/catalog/product/1
I want this way:
http://localhost/catalog/product/1

I followed this recomendation http://ellislab.com/codeigniter/user-gui...subfolders

I hope you can help me to solve this.
Thanks
N

My structure of folder is this:
Code:
htdocs/
    system/
        application/
            config/
            controllers/
                admin/
                site/
            errors/
            helpers/
            hooks/
            languages/
            libraries/
            models/
                admin/
                site/
            views/
                admin/
                site/
#2

[eluser]ElShotte[/eluser]
Have you installed Auth for your user/permission management yet? I would recommend reading the CMS tutorial for CI at programmersvoice.com
#3

[eluser]Nonox[/eluser]
Hi ElShotte, I'll check this out, thanks.
#4

[eluser]daparky[/eluser]
I wouldn't put controllers in folders simply because when i build an application in CI, i use one controller to handle all the actions for a section.

E.g.

user.php controller will handle everything in the /views/user/ folder.

In that user folder i might have edit, add, remove, etc etc.
#5

[eluser]Nonox[/eluser]
I understand, In this case I decided to separate the programation because I thought that it was the best way in this develop.




Theme © iAndrew 2016 - Forum software by © MyBB