Hi Sean,

You need to create a model for your galleries and images (sounds like
you did that already), If you define your gallery to hasMany Images,
and your image to belongTo Gallery then you would only need code like
this in your controller.

function view ($id)
{ // there is no need to directly query the Image model in this example
        $this->Gallery->setId($id);
        $this->set('data', $this->Gallery->read());
}

and in your view if you just put
<?php
// this is the whole data just to see what it is pr is a short call for
print_r
pr ($data);
foreach ($data['Image'] as $Image)
{
..etc..
}

?>

You should have the info you are looking for to generate the image tags
etc.

The 1 1 1 MVC structure is what is determined by default, but you can
have 

0 < models < many 
and 
0 < views < 1 (at a time)

HTH,

AD7six


--~--~---------~--~----~------------~-------~--~----~
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