I have experience with the Media plugin. First, congrats on getting it up
and running w/o docs ;)
What you want is Profile hasMany Image. That way a user can have multiple
images. If you want "types" of images per user, you can use the 'group'
field included in the SQL he provides. Or, you can always add your own field
to the attachments table, it's still just a table.
For rendering the image, you can use the embed method on the Media helper:
$path = 'm'.DS.$image['Image']['dirname'].DS.$image['Image']['basename'];
echo $this->Media->embed($path, array('restrict' => 'image'));
As I recall if you're using Coupler it should add a 'path' key so you don't
need to concat the basename and dirname. In the 'next' branch, there's a
sample virtual field which accomplishes the same thing.
hth,
jeremy
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php