How to Fetch Articles in the home_page.hbs Template in the Zendesk Help Center? | Community
Skip to main content

How to Fetch Articles in the home_page.hbs Template in the Zendesk Help Center?

  • August 6, 2024
  • 2 replies
  • 0 views

Hello,

I am currently creating a theme for the Zendesk Help Center, based on the Copenhagen Theme by Zendesk.

I tried to retrieve articles using the method found in a Stack Overflow question. Here is the code:
https://stackoverflow.com/questions/60850305/how-do-i-render-links-from-a-certain-section-on-a-zendesk-help-centre-home-page

{{#each categories}}
 {{#each sections}}
   {{#is id 360001734738}}
     {{#each articles}}
       <a href="{{url}}">{{title}}</a>
     {{/each}}
   {{/is}}
 {{/each}}
{{/each}}

However, I am not able to retrieve the articles successfully and encountered the following error:

Error: InvalidTemplates - Template(s) with syntax error(s)
Validation error: `articles` does not exist

According to this link, the section object should contain articles: https://developer.zendesk.com/api-reference/help_center/help-center-templates/objects/#section-object

If you have any hints or solutions, I would appreciate your assistance. Thank you very much.
 

2 replies

Jihoon11
  • August 6, 2024

Hi satoshi tanoue

 

Unfortunately, the 'article' object is no longer available in theme template v4.

 

https://developer.zendesk.com/api-reference/help_center/help-center-templates/v3/

 

I'm looking into it too, but haven't found a solution yet.

 

As of now, if you need to use the 'article' object, you'll need to downgrade your theme to version 3.x.x by editing your manifest file.


  • Author
  • August 20, 2024

Thank you so much for letting me know!
I’ll try downgrading the theme to version 3.x.x based on your suggestion.
I really appreciate you taking the time to help!