Configuring the Questions Widget
Liferay DXP/Portal 7.3+
There are two primary methods for configuring the Questions widget: directly through the widget configuration and through the System Settings configuration.
To configure through the widget configuration,
-
Start editing the page where the Questions widget has been deployed.
-
Click Options () in the widget header → Configuration.
TipBefore Liferay DXP 2025.Q1, the Configuration option was located in the widget’s top-right corner.
To configure through System Settings,
-
Navigate to Control Panel → System Settings → Message Boards.
-
Click on Questions under Widget Scope.
Topic Display Style
Topics can be displayed as cards or as a list.
-
Click Options () in the widget header → Configuration.
NoteBefore Liferay DXP 2025.Q1, the Configuration option appeared in the widget’s top-right corner.
-
Under General Settings, there is a Show Cards for Topic Navigation option.
If this is checked, the widget displays separate cards for each question topic. If it is not checked, the widget displays a list of all the questions.
Limiting Topic Display
Questions default display behavior is to show all Topics. You can opt to only display certain topics by configuring a Root Topic. To only display specific sub-topics or questions do the following,
-
Click Options () in the widget header → Configuration.
NoteBefore Liferay DXP 2025.Q1, the Configuration option appeared in the widget’s top-right corner.
-
Click Select under Root Topic ID.
-
Select a topic and click Save. The widget now only shows sub-topics and questions for the selected topic.
Managing Widget Permissions
-
Click Options () in the widget header → Permissions.
NoteBefore Liferay DXP 2025.Q1, the Permissions option appeared in the widget’s top-right corner.
-
A new window opens.
-
Assign permissions for different Roles. Click Save.
Redirecting Guest Users to Login
To enable this functionality you must configure it through System Settings,
-
Navigate to Control Panel → System Settings → Message Boards.
-
Click Questions under Widget Scope.
-
Check Enable Redirect to Login
-
Guests user are now redirected to a login page when they try to click Ask Question.
A Service Access Policy must be created to allow Guest users to view the widget.
Creating a Service Access Policy to Allow Guest Viewers
-
Navigate to Control Panel → Service Access Policy. Click on the Add icon ().
-
Give the policy a Name and Title. Click the Switch to Advanced Mode button at the bottom. Add the following two signatures under Allowed Service Signatures,
com.liferay.message.boards.service.MBCategoryService#getCategoriesCount com.liferay.message.boards.service.MBCategoryService#getCategory
-
Click Save to save the new policy.
System Configuration Reference
Setting | Description |
---|---|
Show Cards for Topic Navigation | If this is checked, the widget displays separate cards for each question topic. Otherwise, it displays a list of all the questions. |
Use Topic Names in URL | If this is checked, each topic name is used in a more friendly URL instead of a topic ID number. |
Root Topic ID | This setting is ignored. |