Welcome Guest, Not a member yet? Register   Sign In
How to deal with page routing in a custom CMS?
#1

[eluser]Unknown[/eluser]
Hi All - I'm a recent user of Codeigniter and am developing a simple backend CMS to manage pages.

Based on a URL (in this example I have hidden "index.php") : mysite.com/pagename

I would like the system to detect if there is a value of "pagename" in my database, if there is, I need the system to re-route to a custom controller (eg: Pagemaker) and if there is no record called pagename, just do it's normal thing (i.e. find a controller called pagename)

Currently I have:

Code:
$route['(:any)'] = "pagemaker/create/$1";

whereby all requests are forwarded to my custom function.

However I want to change this structure so that if the page does NOT exist in the db, the traditional codeigniter request process is followed.

Can anyone offer any advice about how to complete this? Or any advice about routing custom CMS's in general?


Messages In This Thread
How to deal with page routing in a custom CMS? - by El Forum - 01-14-2011, 04:37 AM
How to deal with page routing in a custom CMS? - by El Forum - 01-14-2011, 07:03 AM
How to deal with page routing in a custom CMS? - by El Forum - 01-14-2011, 07:46 AM
How to deal with page routing in a custom CMS? - by El Forum - 01-14-2011, 07:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB