npacker / nFramework

A simple MVC framework in PHP.
1 stars 0 forks source link

Implement single controller for "content" #6

Closed npacker closed 10 years ago

npacker commented 10 years ago

Instead of a model/view/controller for each type of content, have a single controller/model for content and pull in the necesary fields from the database.

/page/view

/recipe/view

Would instantiate a supercontroller that determines the correct type of content to fetch from the database based on the request string.

This might require a "path" controller that processes the incoming url first, returning the id of the content. This id is passed (with the action) to the "content" controller which performs the final action on that content.