That makes sense. My current implementation is the other way around
though:
(my url looks like this: /products/color/<color_id>)
in product_controller
function color($color_id = null)
{
$this->set('products',
$this->Product->findAllByColor_id($color_id);
}
I found this solution, but it doesn't seem very elegant to me. In the
view:
<h1><?=$products[0]['Color']['name']?></h1>
<?php for ($i=0; $i < count($products); $i++) : ?>
... Output data ...
<?=$products[$i]['Product']['title']?>
... etc ...
<?php endfor ?>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---