The Comments App is designed to allow users to leave a comment on an article. This can be used for the basics of a forum, recipes comments, blog with user comments, or any site where user comments on a Content Type is preferred. The Comment App is based on the User Notes fields. To illustrate the installation and configuration of the Comment App, we will set up a simple forum application.
The Comments App is installed through the Extension Manager as described in Installing Your App.
SetupTo set up the Comments App:
- Create an App Folder
- Create the Content Type for the Forum Item
- Add fields
- Create a List & Search Type for the Content Type
- Add the menu items
Create the Content Type
First step is to set up the Site Form to allow the initial topic to be added.This would be the Forum Topic or question that the user wants to ask. For more information on creating a Content Type, please see Creating a Form.
Site Form View
The Comments are designed to work on the Content section of your Content Type.There are two fields which are included with the Comment App, and must be added to the Content Type; these are Comments (SEBLOD List) and Comment (SEBLOD Form) and can be found in the Field Library.
The Comment Field(SEBLOD Form) can be set up with registration rights so that only registered users can add comments.
Create the List & Search Type
Create a List & Search Type based on the Forum Topics.The results of this list will be all of the topics that users have added.
Add any extra fields needed to the Search Form View if you want to allow the user to search on specific fields.Depending on the type of layout (Blog or List) add a link to the view of the Content Type.
The results of the List & Search be something similar to the following image.
It is important to note that using a category blog to list the forum topics will not work because there will be multiple comment entry forms for each topic. Therefore, it is important to use a search list as presented in this example to display the articles to avoid multiple comment forms.
Create Menu Items
- To Add the Forum Topic Content Type
- To add the List Forum Topics
Finally create the menu items to add your content type and Search types.