Jump to content


Developer Documentation

Displaying comments in your application

EditorLocations extension

In order to display the editor field that enables users to leave comments, you will first need to create the EditorLocations extension for your application. For more information on doing this, consult the WYSIWYG Editor guide.


Displaying comments

It's up to you how comments are displayed in your application. Some applications will display comments in a traditional way, while others may require something much more custom. However you choose to display them, you need to include some standard attributes in your markup in order for functionality like live updating and pagination to work correctly. Here's a very basic approach:

<div data-controller='core.front.core.commentFeed' data-feedID='messages-{$item->id}'>
     {{if $item->commentPageCount() > 1}}
     <div data-role='commentFeed'>
          {{if count( $item->comments() )}}
               {{foreach $item->comments() as $comment}}
               <p data-role='noComments'>{lang="no_comments"}</p>
     <div data-role='replyArea'>

Generic comment templates will be used to build the actual body of each comment. You can customize these via properties in your model; see the model guide for details.

  Report Document

  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy