Welcome Guest, Not a member yet? Register   Sign In
Routing DB pages
#2

We extended the core router and overridden the "_set_routing" method of CI_Router to retrieve additional routes from the database, and simply merged them into the "routes" property of CI_Router. We used PDO to connect to the database there, because CI's db lib is not yet available.

You can also do this directly in the routes config file, but in my eyes logic does not belong in config files.

But I wonder, do you even need this for a CMS? Do you have predefined controllers for each page the user creates? Why not use a "PageBuilder" controller which gets the required content from the DB and builds the page? Or does your CMS require the user to create a controller for his custom page?
Reply


Messages In This Thread
Routing DB pages - by Martin7483 - 09-28-2015, 02:39 AM
RE: Routing DB pages - by slax0r - 09-28-2015, 04:47 AM
RE: Routing DB pages - by Martin7483 - 09-28-2015, 04:58 AM
RE: Routing DB pages - by slax0r - 09-28-2015, 05:03 AM
RE: Routing DB pages - by Martin7483 - 09-28-2015, 05:12 AM
RE: Routing DB pages - by slax0r - 09-28-2015, 05:21 AM
RE: Routing DB pages - by Martin7483 - 09-28-2015, 05:31 AM
RE: Routing DB pages - by slax0r - 09-28-2015, 05:46 AM
RE: Routing DB pages - by Martin7483 - 09-30-2015, 07:48 AM
RE: Routing DB pages - by weblogics - 10-05-2015, 11:07 AM
RE: Routing DB pages - by Martin7483 - 10-08-2015, 07:54 AM
RE: Routing DB pages - by weblogics - 10-09-2015, 05:11 AM
RE: Routing DB pages - by mwhitney - 10-09-2015, 06:33 AM
RE: Routing DB pages - by Martin7483 - 10-15-2015, 01:02 AM
RE: Routing DB pages - by Martin7483 - 10-15-2015, 05:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB