Hello there, maybe this is obvious but ... (and I also searched but could not find anything that would answer my question)
I have categories and a Category Model that acts as a Tree via the TreeBehaviour My categories have an 'active' field. I'm trying to find the best way to 'activate' or 'deactivate' a branch. By that i mean only retrieve categories that are active (or inactive) and have this condition to cascade to their children. Say I want to retrieve only active categories and category 12 is inactive but its chilren are active I don't want to retrieve its children since the parent category is inactive. It was easily achieved (as far as I remember) with the findAllThreaded method since the 'children' array of categories that were not retrieved was not present id the category was ommited from the find operation. I am using the 'children' method of the tree behavior. I tried to change the scope setting to a condition like (active = 1) but of course it does only ommit the categories that I actually set as inactive (not their children). Do I have to set all children active flag to 0 when I set a parent category to 0 (in after save call back for instance) or is there a better way that I can' t see. any help on this would be appreciated tia thomas --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
