Welcome Guest, Not a member yet? Register   Sign In
Not new but trying to figure out how to go about this (Controller + Route / Remap ? )
#1

[eluser]internut[/eluser]
I've not been too active with CI lately but have done some great things with it. I'm trying a different approach.

I'm looking to basically have a way to have from the default install of CI have the Welcome / Index controller + Another controller handle a lot of the front of the site.

Reason for my madness is to have pages all created via DB records.

In short:

.com/ <--- Index Page (welcome.php CLASS)

.com/any-folder/ <--- Routed to: (interior.php CLASS)

.com/any-folder/sub-folder-name/ <--- Routed to : (interior.php CLASS)

The input that comes from segment 1 & 2 (or 3 / 4 / 5 etc) call the DB and populate what interior.php will output via the data grabbed via model and used as output in the view.

Basically allowing a very dynamic site based off DB records. Not creating a controller for every area of the site.

.com/about-us/ (about-us.php controller)
.com/contact-us/ (contact-us.php controller)
.com/help/ (help.php controller).

If I'm not clear let me know Smile

J

Any thoughts?


Messages In This Thread
Not new but trying to figure out how to go about this (Controller + Route / Remap ? ) - by El Forum - 12-13-2010, 07:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB