3093 Posts in 875 Topics by 654 members
| Go to End | ||
| Author | Topic: | 2593 Views |
-
Re: Adding Comments to DataObjects

28 March 2012 at 6:03am
Any updates on this? Would love to be able to differentiate between data objects.
We currently have wordpress blogs on our site - could the new comments system for Silverstripe 3.0 be easily integrated with this or would it require a messy work around?
How long a wait are we looking at?
-
Re: Adding Comments to DataObjects

28 March 2012 at 7:19pm
The comments module is live and working in 3.0 (apart from moderation and ajax posting) but not sure what you mean by integrate with the wordpress blog comments? There's currently no importer or exporter for comments and nothing on the roadmap for it.
-
Re: Adding Comments to DataObjects

5 December 2012 at 1:27am Last edited: 5 December 2012 6:11am
Hi Willr
I am using DataObjects as Pages and would like to use your Comments extension.
I have installed it and the CommentsForm is showing up on my DataObjects after placing the appropriate configuration in mysite/_config file.
I am using the following to render my Post DataObjects as Pages:
public function view($request) {
$segment = $request->param('ID');if ($obj = Post::get()->filter('URLSegment', $segment)->First()) :
switch ($obj->Type) {
case 'News-Post' :
return $this->renderWith(
array('PostsPage_view_news', 'Page'),
array(
'Object' => $obj,
'Type' => $obj->Type,
'Title' => $obj->Title,
'Entry' => $obj->Entry
)
);My question is how would I pass through the $CommentsForm into the Postspage_view_news page?
I have tried the following, but while the form is being rendered, it is not associating the comments made through a form w/ a particular dataobject. Baseclass on comments made are set to SiteTree and not Post.
-
Re: Adding Comments to DataObjects

5 December 2012 at 7:50am
I was able to accomplish passing the form through the renderWith method using: 'CommentsForm' => $obj->CommentsForm().
| 2593 Views | ||
| Go to Top |


