CodeIgniter Forums
How to do this? - 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: How to do this? (/showthread.php?tid=26344)



How to do this? - El Forum - 01-11-2010

[eluser]JanDoToDo[/eluser]
Hey guys,

I am currently starting on a small CMS and i would like to know where to begin!

I want to make every page editable/addable/removable and so I want to have a default controller load up and then choose the page to go to. I'm not sure how to do this however, Would I set somewthing up in MY_Controller which determines the page (as i want to have default, blog and account controllers) and then routes to the controller I want? (so actually i would have default, page, blog and account controllers).

Is this the best way to do it? What would I do to determine which page to go to? Would I check the uri(1) against a database and if there is a match use the data from that row? What would be the typical data in that row?

Many thanks,


How to do this? - El Forum - 02-10-2010

[eluser]Cro_Crx[/eluser]
There's a few topics of ways to do this. If you search for 'URI CMS' or 'MY_Router' you'll get some hits. You can achieve this with a custom router class, similar to what i've posted here => http://ellislab.com/forums/viewthread/143792/