I tend to have

var $uses = null;

you can also have models with no database table

var $useTable = false;  // or null

for getting stuff from other controllers use

<
http://bakery.cakephp.org/articles/view/creating-reusable-elements-with-requestaction
>



On 5/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> 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
>
>
> >
>


-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to