CodeIgniter Forums
Splitting Controllers - 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: Splitting Controllers (/showthread.php?tid=55956)



Splitting Controllers - El Forum - 11-18-2012

[eluser]ibnclaudius[/eluser]
I'm developing a product review website with CodeIgniter, but I'm having some trouble splitting the controllers.

This is what I've already done:

Main - Only the home page
Categories - Categories, subcategories...
Products - Only the product page
Users - Login, Register, Account...
Reviews - Only the page to submit the review

Is this "best" way?

Where should I place pages like contact, about, help...


Splitting Controllers - El Forum - 11-18-2012

[eluser]Eduard Stankovic[/eluser]
create new controller called for example "page" .. content could be loaded from DB, or hard-coded in your views ... and in your route.php add something like that

Code:
$route['about-us'] = 'page/about-us';
$route['contact']  = 'page/contact';