[eluser]douweegbertje[/eluser]
Hello,
I just started with CodeIgniter and its looking very good.
Yet I came to a problem while working on a CMS.
I want the data on the pages to be dynamical..
To give a brief explanation:
Based on "normal" pages with URI as in:
mywebsite.com/home
mywebsite.com/contact
Now taken from the helppage:
example.com/class/function/ID
so I used routing to solve this.
Code:
$route['(:any)'] = "pages/page/$1";
This way with a pages controller you can add the correct data for this page.
Yet what if you have page with
mywebsite.com/about-us/information
mywebsite.com/about-us/location
Should I be using this?:
Code:
$route['(:any)/(:any)'] = "pages/page/$2";
$route['(:any)/(:any)/(:any)'] = "pages/page/$3";
For some reason ive been very busy to understand the way the routing works.
Furthermore I dont see a way to deal with dynamic content, and having pages with static content as a "special module" designed for that page.
To explain:
If I had a registration form, specialy designed for that project. How would I place this into the CMS while having the routes designed for dynamic pages?
For now I have added a route for my admin part:
Code:
$route['admin/(:any)'] = "admin/$1";
but in the end, I feel like working the wrong way.
Any advice, tips and maybe some guide for me to improve my work?
Thanks