Welcome Guest, Not a member yet? Register   Sign In
Again. Controller in Sub-folders (new way?)
#1

[eluser]Ignacio[/eluser]
I'm testing this on 1.5.4

routes.php:
Code:
$route['default_controller'] = "main/main";
$route['scaffolding_trigger'] = "";
$route['privacy'] = "privacy/privacy";
$route['privacy/other'] = "privacy/privacy/other";

folders:
Code:
application/controllers/main/main.php
application/controllers/privacy/privacy.php

views:
Code:
application/views/main/main.php
application/views/privacy/privacy.php
application/views/privacy/other.php

application/controllers/privacy/privacy.php:
Code:
<?php

class Privacy extends Controller {

    function index() {
        $this->load->view('privacy/privacy');
    }

    function other() {
        $this->load->view('privacy/other');
    }

}
?>

Ok... there's all my code, and works fine using this:
Code:
site.com
site.com/privacy
site.com/privacy/other

Yes! Great, works like I want... BUT! look again my routes file..., and imagine 500 pages on my site..., I can't write routes pages by pages, I need an automatic router.

I use http://code.google.com/p/enginemvc/ for a while, but is very small, I need something like CI, but don't have the features like I want. I need some help with this issue.

Thanks!


Messages In This Thread
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 09:29 PM
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 10:14 PM
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 10:29 PM
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 10:59 PM
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 11:03 PM
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 11:38 PM
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 11:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB