Recherches récentes
Pas de recherche récente
Is there a way to show list of categories/sections in guide theme header.hbs ?
Avec réponse
Publication le 06 mai 2021
Is there a way to show list of categories/sections in guide theme header.hbs ?
Would be nice to have a global sidebar/dropdown to navigate to different areas.
1
8
8 commentaire
Marie-Cathrine
Hi Mike,
Since you cannot access the category and section helpers from the header, one way to achieve this is by getting the data from the Help Center API using JavaScript and then display it using HTML and CSS.
You can find the needed endpoints here:
#helpsome regards,
Marie-Cathrine Sørensen
Developer @ helphouse.io
0
Mike
Thanks for the info. I will give that a try.
Is there a reason why the categories/sections cannot be made available in the header template?
0
Marie-Cathrine
I do not know the actual reason as to why they cannot be accessed from the header, but according to this comment, it has to do with the curlybars, the Help Center templating language, which only allows certain helpers and objects to render on certain help center template pages.
If you want to know what can be accessed in which templates, you can find the documentation here.
0
Ifra Saqlain
Hey Mike,
Go through this article :
https://support.zendesk.com/hc/en-us/community/posts/360035925193-Show-list-of-all-Posts-on-Home-page-using-API
Replace the post list API with the given category API
Keep this given code at the header.hbs file.
See the final result and let me know.
Thanks
Team
1
Benjamin BAUDOUIN
Ifra Saqlain
your link isn't available anymore :
"Hey Mike,
Go through this article :
https://support.zendesk.com/hc/en-us/community/posts/360035925193-Show-list-of-all-Posts-on-Home-page-using-API"
0
Brett Bowser
Hey Benjamin,
I was able to find a cached version of the tip Ifra previously shared so I've copied the information over here:
I'll reach out to Ifra to see if she can republish this tip :)
0
Ifra Saqlain
Thanks so much, Brett I was also finding this tip.
0
Nicole
I'm trying to add all sections in the side bar on section pages, much like articles in section is listed in the sidebar on article pages (using OOB Copenhagen theme). Any thoughts how to achieve this? It doesn't need to be dropdowns or anything fancy, just looking to get the options in the sidebar (I can play with the CSS later). I'm not having much luck figuring out the code for that one. I'm hoping to list all the sections under the category that the user is currently in. We have a customer-facing category as well as an agent-facing category. Section.sections seems to point and subsections of a section. I'm hoping to link sections of a category. Thanks in advance for any help that can be offered!
0