This looks like your classic e-commerce shop with multi-level
categories and items which could belong to multiple categories.

I would say you need to look at Cake's Tree Behaviour for the
categories (not used it yet myself, but is very good) and your Item
model would then have a HABTM association to your Category model which
would use tree behaviour to figure out how deep in the tree any given
category was.

I know this doesn't directly answer your question, but if someone
answers the above and you put it into production you're going to be
using a very inflexible system which you're going to have to pull
apart as soon as the site begins to expand.

But a pointer for your current setup whilst trying to get it to work
is to use debug($cat); to echo out your data array, saves you having
to do all those for loops whilst you're trying to figure our if your
find has pulled the data in the correct manner.  Make sure you have
debug set to at least 1 in /app/core/config.php
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to