hmm... I added only a model in my class, then I do not understand what and where to add more.
I have a class BookPage extends Page and Book extends DataObject
In class Book I added:
static $has_many = array (
'LinkComment' => 'DataObjectComment'
in class BookPage_Controller added function:
function DataObjectComment () (
$Obj = DataObject::get_one ("Book", 'ID ='. Convert::raw2sql ((int) $this->urlParams['ID']));
return new DataObjectCommentInterface ($obj, 'DataObjectComments', $obj-> data ());
in Template i use $DataObjectComment and see Comments and form post, but he not work
I really do not know how to get to work. Maybe someone can give me an example for the study?
no anyone easy example?