Welcome Guest, Not a member yet? Register   Sign In
mvc question
#1

[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.
#2

[eluser]ghprod[/eluser]
Hi, maybe its easier if you place some additional SEGMENT, so we can detect more precission Smile

example

/controller/category/category.html
/controller/item/item.html

so in route we just need to detect category OR item 2nd segment Smile




Theme © iAndrew 2016 - Forum software by © MyBB