Here's my solution.  It's not the most elegant in the world, but it
gets the job done.  If anyone has a suggestion for a better way, please
chime in.

                $categoryData = $this->requestAction('/categories/select/');

                $this->Product->Color->id = $color_id;
                $data = $this->Product->Color->read();
                for ($i=0; $i<count($data['Product']); $i++)
                {
                        $catId = $data['Product'][$i]['category_id'];
                        $data['Product'][$i]['categoryTitle'] = 
$categoryData[$catId];
                }
                $this->set('products', $data['Product']);

basically, I'm getting the category data, then getting the product data
related to the selected color...and finally looping through the
products and adding the category title.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to