Flexible Hierarchies enables you to add subsections (sections in sections), to your help center knowledge base to create more levels in your hierarchy, up to six levels deep.
By default, the help center category page lists all sections in the category and all articles in each section in the category. When you add subsections to a section, the category page does not list subsections in the section by default, but instead the section with subsections appears as "empty" on the category page.
You can modify your template to change that behavior by using the helper section.sections
to loop through to present the subsections in a section.
You can only show the direct subsections of a section. You cannot show multiple levels of subsections.
Showing subsections in both the category and section page
-
For the section page, the template shows a preview of the articles directly under it, and the list of sections' subsections with a preview of their articles
-
For the category page, for each section, the template shows a preview of the articles within, and the list of its subsections
Showing categories and sections as blocks
Here are example gists for the section page template and the category page template.
-
For the section page, the template shows all of the section's immediate subsections as blocks, and all the articles directly below
-
For the category page, template shows all immediate sections as blocks
Showing subsections in the standard Copenhagen theme
Our own implementation of subsections in the Copenhagen standard theme groups them at the top of the section page while showing the article list below.
Here’s a link to the section page template.
2 Comments
Hi, where do I add a code for the category in category_page.hbs? Do I delete a part of the old code or do I just need to add the code somewhere in the original code?
Thank you for reaching out to Zendesk Support Advocacy team. My name is Rick and I'll be assisting you today.
If I understand this correctly, then this is the best guide to follow on adding Category : Adding Multiple Category, Section, Article
On the other hand, if you wish to do it via source code it would be best to coordinate it with your devs team as we provide limited support to customization specially via source code.
Hope this helps. Should you have further concern, feel free to respond on this thread.
Cheers
Please sign in to leave a comment.