Array of Category objects in the Category page | Community
Skip to main content

Array of Category objects in the Category page

  • March 17, 2017
  • 4 replies
  • 0 views

Hello, I want to create a sidebar in the Category page (Help Center templates) in order to show to the user all Categories and Sections I have available to him to facilitate the navigation and also highlight the actual Category. The problem is that in the Category page I don't have access to the array of categories, only the actual category and it's sections. Is there any different approach that I can use to achieve the same result?
This topic has been closed for replies.

4 replies

Vladan
  • March 17, 2017

Yes, you should use ZD API to achieve that

https://developer.zendesk.com/rest_api/docs/help_center/categories

 


  • March 20, 2017

Hi Thiago,

You can try the API to accomplish it. If you want a quick solution, you can try our plugin available here: Multi-level Menu

Thanks,

Diziana


  • May 25, 2017

Hi @Vladan, would you mind expanding on how to use the ZD API to achieve this? I am fairly new to coding & was not able to find any tutorials about it. 

I am using the Copenhagen theme.

Thanks!


Vladan
  • May 27, 2017

Hey Ashwini, you need something like this:

https://stackoverflow.com/questions/8951810/how-to-parse-json-data-with-jquery-javascript

Or you can take a look on one similar example (pulls articles list in current section, which is even easier then to pull all categories).

https://support.zendesk.com/hc/en-us/community/posts/211590607/comments/213756968

You can play around and feel free to back here if additional help needed! 

Thanks!