Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

$pageComments Question


Go to End


2 Posts   1346 Views

Avatar
fengdeadshot

Community Member, 6 Posts

2 April 2011 at 2:43am

Hi guys, I was wondering how the $pageComments works from the behavior tab?
I mean how you just put the variable where you want comments displayed and then enable it,
and BAM it works...

I'm trying to make a JQueryImageCarousel Drop in module,
I kinda wanna get it working much like the pageComments where you can drop and go.
Any ideas, or know how about how this works?

I'm going through the documentation and such now, but if someone knows that would be great.

Avatar
Willr

Forum Moderator, 5523 Posts

2 April 2011 at 6:00pm

I mean how you just put the variable where you want comments displayed and then enable it,
and BAM it works...

Yes this is how it works. If you want an example of how you should do it check out the new comments module (https://github.com/silverstripe/silverstripe-comments) or more specifically the function https://github.com/silverstripe/silverstripe-comments/blob/master/code/extensions/CommentsExtension.php will help.

How this works is adds an extension to a Page object (via the comments/_config.php). That extension (which I linked above) has several functions like $CommentsForm which can be called (since that extension is now on the object).