Welcome Guest, Not a member yet? Register   Sign In
Link structures
#6

[eluser]Sean Gates[/eluser]
If you want you can set routing up from within your controller. Example:

Code:
Class Admin extends Controller{
    
    function Admin(){
        parent::Controller();
    }
    
    function index(){
        //Do something    
    }

    function add_page(){
        //Do something    
    }

    function pages($other_method = NULL){
        if(!is_null($other_method)){
            $this->$other_method();
        }
        else{
            // default for /admin/pages
        }
    }

}

Then you can use either:

Code:
http://somesite.com/admin/pages/add_page

or

Code:
http://somesite.com/admin/add_page


Messages In This Thread
Link structures - by El Forum - 01-08-2010, 06:21 AM
Link structures - by El Forum - 01-08-2010, 06:28 AM
Link structures - by El Forum - 01-08-2010, 07:00 AM
Link structures - by El Forum - 01-08-2010, 10:52 AM
Link structures - by El Forum - 01-08-2010, 12:24 PM
Link structures - by El Forum - 01-08-2010, 10:39 PM
Link structures - by El Forum - 01-08-2010, 10:40 PM
Link structures - by El Forum - 01-09-2010, 02:19 AM
Link structures - by El Forum - 01-09-2010, 11:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB