How to Create Custom Collapsible Sidebar Sections with Subcategories

Hi everyone,

I’m customizing the Discourse sidebar and would like to create a custom collapsible section in the left sidebar, similar to the default “Categories” section — but tailored to my needs.

Here’s exactly what I want to achieve:
• I want to create a custom section in the sidebar called “AI”.
• When a user clicks to expand “AI”, it should reveal subcategories, like:
• Agent
• LLM
• Prompting

Similarly, I want to create another collapsible section called “Crypto”, with subcategories like:
• Bitcoin
• Ethereum
• DeFi

I already created the main categories and subcategories in Discourse. Now I just want these to appear in the sidebar grouped and collapsible, with their respective child categories underneath.

Is there a way to manually define such sections using the interface? Or does this require a plugin or theme component?

Any help or examples would be very appreciated. Thanks in advance!

Hey,

I wonder if this TC can help you: Indented / Nested Sidebar Categories or Subcategories

3 Likes