Forums or message boards are an implementation of an early way of communicating, generating content and interacting through the internet, by creating threaded discussion boards, called bulletin boards. Despite the fact of being one of the most traditional ways to exchange information over the web, forums are still a very effective way to build a community around your website or web application.
Drupal 8 offers by default the Forum module in Core. This module allows you to implement a basic forum on your Drupal site or web application.
Keep reading, in order to learn how to use this module!
Step #1. Enable the Module
- Click Extend
- Scroll down until you find the forum module, or use the search box to filter it out
- Enable the module
- Click Install
No further modules are required.
Step #2. – The Forum Settings
The Forum module has created a new content type called Forums.
- Click Structure > Forums
The concepts to configure the module are the following:
- Topics are Drupal nodes posted into a forum. The comments to these nodes are the threaded replies to the forum topic.
- Topics have to be always inside a forum. It is not possible to place a topic inside a container.
- Forums can contain unlimited forums and can even contain other forums, called child forums.
- Containers are created to hold (wrap) a group of forums. It is possible to wrap a container around many forums, the same way a forum can hold one or multiple containers holding at the same time multiple forums.
As you can see, with the right planning, it is possible to create complex nested structures to categorize the content of users.
- Click Edit to configure the General discussion forum
- Scroll down and click Delete
- Click Add container
If your site was about pets, then it is very probable that you would have a section for dogs and a section for cats, for example. To organize the forum content, it makes sense to create a global container for each one of these pets.
- Enter the required information
- Click Save
- Click Add forum
- Create as many forums as needed, according to your own categorization
These forums will be placed at the first level of the container
Besides these forums on the first container level, we are going to create additional child forums, to preserve the information structure and be able to do comparisons between them later on.
The final structure should look like the image below.
Step #3. – Adding Topics to the Forum
- Click on the root link, that is the link of the main container (in this case Dogs)
The system will send you to a page with the following URL pattern:
Notice that the column Topics on the table shows no results. That is because we have not added a topic to any of the forums.
- Click on the Food link below the parent forum Herding group
- Click Add new forum topic
Check that you are placing the topic in the right place.
- Click Save
Each one of the comments to this new node will increase the count on the forums table.
If you click on the forum link, you will see a table with all the topic details of that particular forum.
I hope you liked this tutorial. Thanks for reading!