two ids in a view $id, $id
Hi guys,
having a problem to display two ids in a controller....
I need to display page having ids in a URL. ...
e.g. domain.com/index.php/groups/show/3/26
I need this to show photos (26, 27, 32, 35,... 41...) in groups 3, and
so on for group 4 (28, 29, 33...) and so on...
abviouslly I'm doing something wrong.
How do I do that... any one can help... greatly appreciated...
function show($id, $id)
{
if(!($group = $this->Group->findById($id)))
{
$this->flash('error', ucfirst(i18n::translate('group not
found')));
$this->redirect('/');
}
else
{
if(!($photo = $this->GroupPhoto->findByIdAndGroupId($id,
$group['Group']['id'])))
{
$this->flash('error', ucfirst(i18n::translate('photo not
found')));
$this->redirect('/');
}
}
Thanks
Chris
--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home