How to manage a find in a recursive model with CakePHP?
categories
, each category can have a parent category
; how could I perform a find
to retrieve the entire categories struct开发者_如何转开发ure?
I tried changing the recursive
property but it's limited to 2 levels. Is there a way to do it with purely CakePHP functions/attributes or do I have to write a function and recreate the entire structure by myself?
why don't you have a look at the tree behavior? It should do you what you're after! Read up at http://book.cakephp.org/view/1339/Tree
精彩评论