7938 Posts in 1466 Topics by 943 members
Page: 1 2
|Go to End|
9 September 2010 at 12:30am Last edited: 9 September 2010 12:42am
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
10 September 2010 at 1:16am
I really do not know how to get to work. Maybe someone can give me an example for the study?
23 September 2010 at 12:17am
no anyone easy example?
1 February 2012 at 10:56am
have you solved your issue? If yes, can you help me with the same problem?
my issue is explained here..
Page: 1 2
|Go to Top|