Hello smart people!
I’ve tried to search for some examples, but was not a success, unfortunately.
We have a category that includes 80+ subcategories, and we need to display all these subcategories as a sidebar, like here:
Is there any way to do so? Or maybe there are examples of similar cases so that we can have a look?
If you are looking to have each Category filter the topics in the topic list, then I suggest using the Discourse Docs plugin and setting that category as your documentation category. This way you can take advantage of the filtering feature that the plugin has. You can see it working on Meta here at /docs
However, if you purely looking to showcase the categories as links to each category, you can try adding the Layouts plugin which is a framework for adding custom layouts widgets on either the left or right sidebars. After adding the plugin you would then install the Category List Widget to showcase the categories.
Alternatively, the Right Sidebar Blocks theme component also looks like a good solution. Though I haven’t tried it yet.
I think the best alternative here is to use a theme component, Discourse Category Sidebars could also work. You can set the sidebar to the parent category, and then create a topic with a list of links to the subcategories. You could even include the “Add a new idea” and the “Filter by category” parts.
It would require some manual work to set it up though. And you’d have to fix it every time a subcategory changes.
Other than that, this could be done with custom development work. If your site is hosted by us, you can send us a private message, and we can talk about it. We’ve done very similar work to this for other customers.
Hi @keegan and @cocococosti , thanks a lot for your help and for the solutions provided!
I do believe any of them will be a perfect fit for our use case
I think this is an interesting feature request for the Right sidebar blocks theme component, and it turns out it wasn’t too hard to add to that component. So if you now add a block configuration to that component with
subcategory-list, it will show the category’s children in the sidebar. Here’s an example:
The “Subcategories” label can be edited in that theme component’s translations.
Hi @pmusaraj, this is just awesome, thank you sooo much for that!!
I’ll definitely show this plugin to our developers, but it seems it’s going to be a perfect solution
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.