Por ejemplo: para ver el Post numero X hay que usar esta funcion:
Código: Seleccionar todo
function view($id)
{
$this->Post->id = $id;
$this->set('post', $this->Post->read());
}
Código: Seleccionar todo
function add()
{
if (!empty($this->data))
{
if ($this->Post->save($this->data))
{
$this->flash('Your post has been saved.','/posts');
}
}
}
http://www.cakephp.org