Sounds like you just need to be careful of how you pass data into the
ReplyElement you have created. For the first you pass just the $data
itself. For the second where you have multiple replies you are going
to have to use a loop.
foreach ($data['Reply'] as $row) {
$this->renderElement('reply', array('row' => $row, 'user' =>
$row['User']));
}
for the one where you only want one reply to show and perhaps that is
in a $data variable.
$this->renderElement('reply', array('row' => $data['Reply'], 'user' =>
$data['User']));
This way you pass just array of the main table columns of the reply and
user to the row and user variables to be used in your reply element.
So, instead of the $reply['Reply']['username'] you would just use
$row['username'].
Hope this makes sense.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---