Nested Comments Thread (with Like and Reply)
Overview
This module is a list of comments or messages by different users, with the ability for a user to create a new comment, reply, or like a comment. It can be added on any object (a topic, a product, etc.). App admins (or users with admin access) will be able to click on the ... icon to delete any comment in the thread via a menu focus group.

Structure
When this module is added to a page, it has a reusable element inside called
nestedcomments. This reusable element contains all of the logic and UI for the module.Within the
nestedcommentsreusable element, there is another reusable element calledcommentsmenufocusgroup. For more information on how to usemenufocusgroups, please click here.The module also comes with a data type called
t-Comments. This is the data type that will store all of the comments.All of the parent comments are displayed in
RepeatingGroup t-Comment parentand all of the children comments are displayed inRepeatingGroup t-Comment.Button POSTcreates a new parent comment.Button REPLYcreates a new child comment.Text Likelikes a comment.Group Option 2 (Delete)deletes a comment.

How to set up
Add a field to the
t-Commentdata type that represents the object on which you want users to comment. For example, if you want users to comment on products, you should add aProductfield.

Open the
nestedcommentsreusableModify the type of content displayed in the reusable to be whatever object for which you want to show comments. In this case you should make the group type be
Product.

Modify the data source for
RepeatingGroup t-Comment parentto include whatever filter you need. In this case, you should only include comments that are linked to the Product being displayed.

Modify the action that runs when the
Button POSTis clicked to also link thet-Commentcreated to the relevant object, in this case the Product that's displayed in the reusable.

Add a data source whenever you use the
nestedcommentsreusable that links to the appropriate object (in this case the Product that's displayed on the page).

Last updated
Was this helpful?