CodeIgniter Forums
4th level URL / Folder - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: 4th level URL / Folder (/showthread.php?tid=60419)



4th level URL / Folder - El Forum - 03-22-2014

[eluser]Unknown[/eluser]
Hi i'm trying to make reasonably easy to understand URLs but i got stock not being able to cerete URi of next level. I want to go something like this:

http://www.example.com/admin/chairs/edit/10

where i already have pages for Admin and Chairs but from Chairs page i want to click edit button and go to next folder (for organizational purposes) and load ID =10 for editing

How can i configure controller? In my controller i have admin.php and in it i was trying to load admin->chairs-> edit

But that did not help Sad
I googled around and found this thread http://glennpratama.wordpress.com/2009/10/20/multi-level-subfolder-for-controller-in-codeigniter/
but that did not help either Sad

Hopefully some one can help me out, tnx!




4th level URL / Folder - El Forum - 03-24-2014

[eluser]Massaki[/eluser]
In admin.php (controller):

function chairs ($option=0, $id)
{
if ($option == 'edit')
{
// Get data, load views, etc..
}
}


4th level URL / Folder - El Forum - 03-24-2014

[eluser]Unknown[/eluser]
yay its so easy Smile i have no idea why i could not figure that out Smile
tnx a lot!