This code would go into the Category model. If you want to call it from the 
categories_controller, make a small change:

$categories = $this->Category->find(...

Still add the Containable behaviour and recursive setting to the Category model 
or app_model though.

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 4 Nov 2011, at 16:36, Daniel wrote:

> Thanks for your help, but where do I put the "find" ?
> 
> On Nov 2, 4:10 am, Jeremy Burns | Class Outfit
> <[email protected]> wrote:
>> This is basic stuff.
>> 
>> var $actsAs = array('Containable');
>> var $recursive = -1;
>> 
>> Ideally do this in app_model so that your whole app uses the Contain 
>> behaviour.
>> 
>> Your Category find is now:
>> ...
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to