Category Groups

:discourse2: Summary Category Groups allows you to assign categories to groups, which are then used to sort and collapse categories on the categories page.
:eyeglasses: Preview Preview on Discourse Theme Creator
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-category-groups-component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

Features

:information_source: Important things to note:

  • This theme component only works with the site setting desktop category page style set to boxes with subcategories (as it replaces that category page template).

  • The category collapsing works using your browser’s local storage, so the collapsed state will not be remembered between different devices.

Settings

Name Description
category groups This is how the groups are configured. Format as: Group name: category-slug, extra-link-id, category-slug-2 (The category slug is the name of the category as it’s seen in URLs. Usually all lowercase with no spaces)
extra links Extra links that can be mixed into category list. Add link ID in category_groups setting to render
show on mobile Show the collapsible category box groups on mobile
show ungrouped Display a group of categories that aren’t assigned to another group
fancy styling Turn on additional styling (These are some custom styles added. They stray from our defaults, so if you’re working on your own theme you may want to disable this)
hide muted subcategories When enabled, a non-muted parent category will not appear under the muted section if it has a muted subcategory
Theme Translations Default
ungrouped_categories_title Other

:discourse2: Hosted by us? Theme components are available to use on our Standard, Business and Enterprise plans.

Last edited by @JammyDodger 2024-06-11T09:28:21Z

Check documentPerform check on document:
53 Likes