Recent searches
No recent searches
Using heading levels (H1, H2, H3) and rendering in the left nav panel
Answered
Posted Dec 13, 2021
Hello folks,
I am using various heading levels to build an article and expecting the headings to render in the left nav. This is to quickly navigate across the headings within the article from the left nav directly. (Just like when one builds the heading hierarchy in Google docs). However, these heading do not render. The left nav displays only the articles that are available in that specific section and do not display the headings that are used at the article level. Am I missing something here, or this is an expected Zendesk behavior?
Thanks
0
1
1 comment
Dave Dyson
That's the expected behavior for the default Copenhagen help center theme.
In order to change the behavior to what you want, you'd need to do some editing of your theme's HTML, CSS, and Javascript in the Article page template in order to parse the header structure in your article, build the table on contents from that, and display it in the left-hand navbar (instead of the list of other articles in the current help center Section).
If you haven't editing your help center theme before, there's some general information on doing that here: Customizing your help center theme
If you're comfortable doing that, then the code suggested in this article should get you part of the way there -- it's designed to parse the header structure in an article, and build a table of contents that would be displayed at the top of the article (instead of in the left-hand navbar): Create a Table of Contents automatically
I hope that's helpful!
0