mvc question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: mvc question (/showthread.php?tid=43953) |
mvc question - El Forum - 07-28-2011 [eluser]Unknown[/eluser] Hi, I am in the process of creating a controller that handles various historic pages for our site. I am new to codeigniter and MVC architecture in general. Basically I am wondering if my MVC methodology is correct, and if not a recommendation of how I should get around this bear. These are historic pages, and I am loath to change them unnecessarily. An example: /bluewidgets/bluewidgets-hairycategory.html < category uri /bluewidgets/copiouslyhairywidget.html < product/item uri I have set up my routes so both go to the same controller page. The method within that controller will load various views depending on the uri. It first checks for a category in the database, followed by a check to the product database, and finally loads the show_404() function. Any thoughts are appreciated, TIA. mvc question - El Forum - 07-28-2011 [eluser]ghprod[/eluser] Hi, maybe its easier if you place some additional SEGMENT, so we can detect more precission example /controller/category/category.html /controller/item/item.html so in route we just need to detect category OR item 2nd segment |