On Wed, Feb 25, 2009 at 12:47 PM, Kappa <[email protected]> wrote:
>
> Maybe (i don't know if is a valid solution) you can try to do this
> thing:
>
> you can import all the controllers, invoke their actions and
> then return their computed data , and set those as view variables
>
> something like:
>
> $this->set( 'articles' , $mycontroller->latest_articles() );
Or put the methods in the various models and call them like so:
$this->set('articles', ClassRegistry::init('Article')->getSomeArticles());
$this->set('whatevers', ClassRegistry::init('Whatever')->getSomeWhatevers());
...
This way, the controller needn't import the models, nor have them in $uses.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---