I am fairly new to CakePHP, but here is what I came up with. Controllers don't need to have a model associated with it, just set the controller to process anything that needs to be processed and create the view. Made sure to set the value for $uses = array(); so that it does not try to load up any models. See if that helps you out.
- JP (Quanack) On May 16, 11:20 pm, MarsDev <[EMAIL PROTECTED]> wrote: > Hi All, > > I am a newbie to cakePHP and the model-view-controller pattern. But > according to the books, it seems that every page cakePHP generated has > to be associated with a controller, a view and a model. Since the > cakePHP URL pattern is such that "/controller/action/params", it's > natural to have each page associated with a controller, the action and > its view. While it works quite well for most cases, I am having a > difficult time trying to figure out how should I code in order to show > something like a homepage, which only shows a aggregated view of the > stuff that are generated from other controllers. That said, home page > doesn't have any specific model associations. I.E. > > http://www.example.com/home/index > > I know that index can be omitted. I have HomeController and the index > action defined, so is the view for index action. But then if I type > in that URL in my sandbox, It asks me for the home model ??!! I don't > really have one. All I have are all concrete models like "Customer", > "Orders" among others. Is there work-arounds? > > Also what's the best way to pull all the contents that are generated > from other controller/actions and aggregate them into one page? > > Anyone can help me better understand the cakePHP or MVC pattern in > general will be highly appreciated! > > Thanks! > > -Ye --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
