morning Z,

For the actual dynamic menu you've got as many options as the Internet
can throw at you. I quite like the pure CSS version by StylePhreak but
everyone has their own opinion.

Would welcome suggestions if anyone had a pearler.

As for pulling your data from the DB in a way that would easily
translate in to this format I would say you could do a simple findAll
on your category Model with recursive set to 1 and it should do the
trick.

This will give you a list of all your categories and all products
associated to each one. As long as your hasMany association exists
from your category to your product and your belongsTo from your
product to your category.

Is this what you're after? Have you gone through the associations
section of the manual?

Cheers,
mikee

On 24/10/06, Ziad <[EMAIL PROTECTED]> wrote:
>
> Hello everyone:
>
> i have been trying out cake for a week to decide wheather to use it for
> my app dev.
>
> so far so good but im having difficulity with complex queries and table
> assocciations.
>
> i built 2 simple tables as a try out;
>
> table categories:
> id
> name
> description
>
>
> table products;
> id
> name
> description
> category_id
>
> i built folders, models, controllers and views for each table and all
> great
> at last im trying to build a dynamic menu from database to display
> category and products related to that specific category as follows:
> category1
> - product1
> - product2
> - product3
>
> category2
> -product1
> -product2
> -product3
>
> i played around with the models and controles but no idea
>
> your help is greately appreciated
> thanx
> Z
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to