linked to author's listing
Maybe you meant: 'linked to author's edit (or show) page'?
To do that you would first make a helper function in book_helper
function link_to_author($linktext,$authorId)
{
return $this->_controller->url_helper->link_to($linktext,
array('controller'=>'author',
'action' => 'edit',
'id' => $authorId));
}
and in the view you would use:
<?= $book_helper->link_to_author($book->author->name,$book->author->id)?>
(there is probably also a nice Sintags version.. but I don't know it)
If the authors' names don't already show on your books listing page: make sure you include the authors in the search:
$this->books =& $this->Book->find('all', array('include' => 'author'));
1 to 3 of 3