Link structures

#1
[eluser]Jmz[/eluser]
I've been reading up on CI and I think I have the basics, but there's one thing I can't work out about the link structure.

Say I'm making a blog where a user has an admin panel and an add page option. My class for the admin panel would look like:

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

    function Add_page(){
        //Do something    
    }

}

If I go to mysite.com/admin it does whatever is in the Index function. If I go to mysite.com/admin/add_page it does whatever is in the Add_page function. Makes sense.

What if I want to change the link to mysite.com/admin/pages/add_page so that it's more organised? Can I do this?


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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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