I am facing a small problem here.To get you to the point i have 2
models User,Profile and their controllers as well.I have set up the
relations and then i created an element which appears when user logs
in.In the element i have put options in order to view,edit User
details and Profile details.I have managed to pass the id of user from
the view like this ---->
<?php echo $html->image("cog.png",array("alt" =>
"Edit","title"=>"Edit",'url' => array('controller' => 'users',
'action' => 'edit',$session->read('Auth.User.id'))));?>
and now i want to pass the profile id but when i do ----->
<?php echo $html->image("user_go.png",array("alt" =>
"View" ,"title"=>"View",'url' => array('controller' => 'profiles',
'action' => 'view',$user['Profile']['id'])));?> i take 2 errors that
user and profile variables are not defined.
How can I take the profile id to pass it to the profiles_controller
like in the users above??
Is there any way to do it?
Ty very much in advance!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment