7912 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Allow Comments in DataObjectManager
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | ||
| Author | Topic: | 1631 Views |
-
Re: Allow Comments in DataObjectManager

8 September 2010 at 1:33pm
You added a $has_many inside the DataObjectManager class? It's a form field, not a model.
---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com -
Re: Allow Comments in DataObjectManager

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
-
Re: Allow Comments in DataObjectManager

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?
-
Re: Allow Comments in DataObjectManager

1 February 2012 at 10:56am
Hi freenet,
have you solved your issue? If yes, can you help me with the same problem?
my issue is explained here..
http://www.silverstripe.org/dataobjectmanager-module-forum/show/19101
thanks
| 1631 Views | ||
| Go to Top |


