Do you want to give your users a more streamlined experience when browsing your community's discussion posts? Available exclusively for custom discussion page layouts is the ability to sort and filter discussions.
These tools make it easier not only for your users to browse through community posts but also for your community Admins to manage them.
In this article, you'll learn how to:
- Sort and filter your discussions
- Create and configure a custom discussions page layout for your community
- Set a default sort option
You can sort discussions in the following ways:
- Recently commented
- Recently created
- 📝 NOTE: Sort functionality will be expanded to other areas of your community in the future. In addition, it will be a default feature and not just limited to custom discussion page layouts.
You can filter discussions in the following ways:
- Post Type: Select which type of content to display: Discussions, Questions, Ideas, or Polls. You can select multiple types.
- 📝 NOTE: The Post Types available depend on the types enabled in your community. For example, if you don't have Questions enabled, it will not be listed.
- Post Status: For Questions and Ideas, specifically, you can choose one or more statuses, such as Unanswered or Accepted for Questions.
- Tags: Select one or more tags to filter content to just those tags.
Applied filters are indicated by a checkmark on the Filters icon, as shown above.
- To clear all filters, click the (X) icon.
- To clear one or more specific filters, click the Filters icon and make your updates in the dialog.
Additional filters: Resolution Status
Administrators and users with the appropriate permissions will see the Resolution Status section with two additional filters: Unresolved and Resolved. Use these filters to only view discussions meeting one of these statuses, making it easy to pinpoint content that may need attention.
These filters are only available if the Resolved Discussions V2 addon is enabled in your community.
Create a custom discussion page layout
As mentioned above, the ability to sort and filter is currently limited to custom discussion page layouts. Let's walk through how to create and apply one of these layouts for your community so you can offer this feature to your users.
1. Access the Dashboard.
2. Navigate to the Appearance tab, and then expand LAYOUTS > Discussions Page.
3. Click Add Custom Layout.
4. At the top of the editor, click the pencil icon to edit your custom layout's name. Give it an appropriate title.
5. Custom discussion page layouts automatically have the Discussions List widget added (in fact, it cannot be removed), and the ability to sort and filter is also automatically available. At this point, unless you want to further customize the page (e.g., additional sections and/or widgets), the only thing left to do is set the default Sort Order in the widget (it's Recently Commented, by default).
- To set a default Sort Order, click to select the Discussions List widget, followed by the pencil icon. In the dialog, in the Display Options section, click the Default Sort Order dropdown and select your option. This will be the default sort order for the page but users are free to change it.
- To learn more about customizing a layout, including managing widgets and sections, see Create a Custom Layout.
6. When finished configuring the widget, click Save to apply your changes and close the dialog.
7. At the top right of the Layout Editor, click Save to save your custom layout. You'll be back on the Dashboard > Appearance tab with your custom layout selected.
8. The last thing to do is apply your custom layout to make sorting available to your users on the Recent Discussions page. Click the elipsis (...) menu at the top right and select Apply.
9. In the popup, select the page(s) to apply the layout to, and then click Apply.
On the front end of your community, navigate to your Discussions page to test the Sort Order feature. Notice how the default sort option you chose earlier is automatically selected but can be changed via the dropdown.