Re: data from multiple 'model' definitions in one 'view'

2006-04-30 Thread AD7six

Hi b,

Are these models related? If you are just wanting all Bs linked to A,
you can easily do this by specifying the recursive parameter for your A
model and searching class A. Ref:
http://groups.google.com/group/cake-php/browse_frm/thread/bef70558f7854732/865df96b0d8b2420?q=recursive+naternum=1#865df96b0d8b2420

If the models are not related, you can define all the models you want
to use in your controller uses variable, and they will be avaliable to
use directly off the controller.

e.g.
class LotsofModelsController extends AppController
{
var $uses = Array(Stuff,Thingy,Thought);

function index();
   $allStuffs = $this-Stuff-findAll();
   $allThingies = $this-Thingy-findAll();
   $allThoughts = $this-Thought-findAll();
...

Hope it helps,

Cheers,

AD7six


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



data from multiple 'model' definitions in one 'view'

2006-04-29 Thread [EMAIL PROTECTED]

Hi, I'm not sure the best way to include data from different model
definitions in one 'view', I have several screens that need to show
data from a variety of model classes.

Any help is appreciated.

b


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: data from multiple 'model' definitions in one 'view'

2006-04-29 Thread bigdog

or it could be:  $this-requestAction


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---