Re: How to test for the current model?

2006-08-22 Thread Simplerules
Well, I have the component 'Logins' and the model 'Users'. I need to access a function in 'Users' model. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: How to test for the current model?

2006-08-22 Thread AD7six
Hi Simplerules try something like the following in your component: $User = new User; $result = $User-mySpecialFuction($MyParams); Cheers, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group.

Re: How to test for the current model?

2006-08-22 Thread Simplerules
Thanks :) That worked. --~--~-~--~~~---~--~~ 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]

Re: [spam] Re: How to test for the current model?

2006-08-22 Thread Bernard Grosperrin
Mikee $this-controller so you can check for the controller name if ($this-controller-name == 'Blahs') { display } or for the modelClass if ($this-controller-modelClass == 'Blah') { display } Cool, thanks, it help! Bernard

How to test for the current model?

2006-08-21 Thread Bernard Grosperrin
I need some help with something which looks like the cat chasing it's tail, to me, but I am a beginner! I have a component which I call from the default.thtml view, as I want it in a sidebar, and that is defined there. But in fact, I would like that component displayed/active only when the

Re: How to test for the current model?

2006-08-21 Thread Mikee Freedom
hey dood, i don't know if this would be the best method but you can access the controller from your views and layouts via: $this-controller so you can check for the controller name if ($this-controller-name == 'Blahs') { display } or for the modelClass if ($this-controller-modelClass ==