How to add a list of Sections in the sidebar on a sections page?
Posted Jun 27, 2022
I am trying to add all sections as a list in the sidebar on the section pages. I am adding to the OOB Copenhagen theme. Basically what I'm trying to accomplish is how the articles in the section are listed in the sidebar on the article pages. I was able to mirror the sidebar setup on the sections_page.hbs. However, there doesn't appear to be helpers/identifiers to accomplish this. I do know I can list the sections of a section, but I'm looking for sections in a category. Where it also may be tricky is that I have categories that are both agent facing and end user facing, and I'd like the section list to populate for the correct category they're in.
I've looked at many, many pages in ZenDesk, and I just can't seem to figure this out. I have tried to work with the info on this page:
https://support.zendesk.com/hc/en-us/community/posts/4409515394330-Is-there-a-way-to-add-Sidebar-navigation-into-an-article
but was never able to get it working.
This is the OOB theme articles page, with articles listed in the sidebar:
I want to do this, but with the sections in the category listed on the side of the section pages:
I was thinking something along the lines of the code listed below, but that would be for subsections of sections, the opposite direction of what I want:
<ul>
{{#each section.sections}}
<li>
<a href="{{url}}" ">{{name}}</a>
</li>
{{/each}}
</ul>
Does anyone have any idea how to help? Thanks in advance!
0
0 comments
Sign in to leave a comment.