Welcome Guest, Not a member yet? Register   Sign In
codeigniter admin part

Congrats on getting started with CI. When I first started with CI, I found myself creating rather large admin controllers to handle each part of the apps. Those site still work fine. That's one approach. Lately, I have been using Modular Separation from Phil Sturgeon for both front and back end. This creates a modules folder in the /application folder. Now each section of the frontend has it's own set of controllers/models/libraries/views.

Then I have something like
...rest of folders

This allows to create a admin module for my frontend controller. I use routes like
$route['admin/([a-zA-Z_-]+)/(:any)'] = '$1/admin_$1/$2';
$route['admin/([a-zA-Z_-]+)'] = '$1/admin_$1/index';
$route['admin/(:any)']        = 'admin/$1';
$route['admin']               = 'admin/index';

Links like /admin/pages/index loads 'pages/admin_pages/index'. The main admin controller in the /controllers folder has one index method and is the admin dashboard usually with latest info like comments, searches, users, etc.

This is a little verbose, but Modular Separation has helped organize my helps much better than before.

Messages In This Thread
codeigniter admin part - by El Forum - 08-31-2010, 07:44 AM
codeigniter admin part - by El Forum - 08-31-2010, 08:28 AM

Theme © iAndrew 2016 - Forum software by © MyBB