Welcome Guest, Not a member yet? Register   Sign In
Best ways to do stuff (several questions)
#2

[eluser]pistolPete[/eluser]
In my CI application, I have a similar setup:
Some controllers serve special needs (e.g. a gallery, calendar, etc.), the rest is just "plain html" which is stored in the database.

For the html content, I use a single controller, called pages, which retrieves the data from the database.
I set up the following routes:
Code:
$route['default_controller'] = "pages";

// now add a route for the other controllers, e.g. :
$route["gallery(.*)"] = "gallery$1";
$route["calendar(.*)"] = "calendar$1";

// every request which ist not caught by the rules above, is routed to the pages controller
$route[':any'] = "pages";


Messages In This Thread
Best ways to do stuff (several questions) - by El Forum - 11-01-2008, 01:54 PM
Best ways to do stuff (several questions) - by El Forum - 11-01-2008, 04:05 PM
Best ways to do stuff (several questions) - by El Forum - 11-01-2008, 04:57 PM
Best ways to do stuff (several questions) - by El Forum - 11-01-2008, 05:15 PM
Best ways to do stuff (several questions) - by El Forum - 11-01-2008, 05:22 PM
Best ways to do stuff (several questions) - by El Forum - 11-01-2008, 05:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB