Hi,
looking for a way to show the Id in the url when calling a function
that was not getting an id via get.
Not giving an Id to the view function will trigger a random id that
works fine like this:
function view($id = null) {
if ($id == null) {
$random = $this->Movie->find('first', array(
'order' => 'rand()',
));
$this->Movie->id = $random['Movie']['id'];
} else {
$this->Movie->id = $id;
}
$this->set('movie', $this->Movie->read());
}
Only I want the resulting Url to be :
domain.com/controller/view/6
and not:
domain.com/controller/view/
This could be important for search engines and facebook comments
integration.
Thanks for your help
--
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