php - CodeIgniter - Select controller based on database -
i'm building simple cms using code igniter version 3.0.0
the site's urls customizable user , not follow standard mvc structure of /controller/method/parameter-1/parameter-2/. instead, frontend traffic gets directed publiccontroller's index method. method searches database current url return correct page, , page type. each page type corresponds controller.
how call controller publiccontroller without doing redirect?
i can't use redirect() method because change url in browser window , cause un-need additional page request.
if @ url /about/who-we-are/ controller , who-we-are function in controller loads 1 or more views.
the same /locations/stores/ functions stores in controller locations.
read documentation , easy understand. http://www.codeigniter.com/user_guide/overview/mvc.html
Comments
Post a Comment