Welcome Guest, Not a member yet? Register   Sign In
CMS best practice on CI
#9

[eluser]Mr. Pickle[/eluser]
Just to add to last post:
Using the folder structure like you want it, makes CI not making the url's like you want to by default.
You either have to solve it by rerouting (see link in previous post) or changing your structure (e.g. different application for the admin)

Rerouting sounds the easiest if you are already this far that the news controller contains security (meaning you can not access it without being logged in)

For example, to put in your routes.php in de /config/ directory something in this direction:

Code:
$routes['admin/news/add'] = 'news/add';
$routes['admin/news/edit/(:num)'] = "news/edit/$1";

Or, if you always have the same uri structure and don't want to make all the different lines for every module and every module method:

Code:
$routes['admin/(news|products|module1|module2)/(:any)'] = '$1/$2';
$routes['admin/(news|products|module1|module2)']        = '$1';


Messages In This Thread
CMS best practice on CI - by El Forum - 10-22-2012, 05:23 AM
CMS best practice on CI - by El Forum - 10-22-2012, 05:41 AM
CMS best practice on CI - by El Forum - 10-22-2012, 05:48 AM
CMS best practice on CI - by El Forum - 10-22-2012, 05:56 AM
CMS best practice on CI - by El Forum - 10-22-2012, 05:57 AM
CMS best practice on CI - by El Forum - 10-22-2012, 05:58 AM
CMS best practice on CI - by El Forum - 10-22-2012, 06:58 AM
CMS best practice on CI - by El Forum - 10-22-2012, 07:06 AM
CMS best practice on CI - by El Forum - 10-22-2012, 07:15 AM
CMS best practice on CI - by El Forum - 10-22-2012, 09:24 AM
CMS best practice on CI - by El Forum - 10-23-2012, 02:31 AM
CMS best practice on CI - by El Forum - 10-23-2012, 04:08 AM
CMS best practice on CI - by El Forum - 10-23-2012, 04:49 AM
CMS best practice on CI - by El Forum - 10-23-2012, 04:55 AM
CMS best practice on CI - by El Forum - 10-23-2012, 05:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB