Displaying Top Articles on Category and Section Pages

7 Comments

  • Jennifer Rowe
    Zendesk Documentation Team

    I love this idea! Thanks for sharing your tip, Sherri!

    0
  • Patrick Harland-Lee

    Hey Sherri Anderson I'm having trouble implementing some of your code in our Community home page. We want to make it look similar to Zendesk's (with a list of 5 manually configured Posts within each Topic), but we get this error "not possible to access `category` in `category.id`":

     

    Our page:

     

    Zendesk's page:

     

    Any ideas what we're doing wrong?

    0
  • Sherri Anderson

    @Patrick are you sure you have the right category ID and that it is published?

    0
  • Patrick Harland-Lee

    Yep, I've even tried moving the code down after each <div> but it isn't making a difference to the site; each time I click Publish the Community page reloads but nothing changes.

    0
  • Karen Snyder

    Patrick Harland-Lee 

    The code that Sherri Anderson displayed in her post was meant for category and section landing pages, which have a category helper. However, you are trying to put the code in the Community home page, which does not have the category helpers= available. According to https://developer.zendesk.com/apps/docs/help-center-templates/community_topic_list_page, the topics helper is available on the Community home page, but I'm not sure how you would get five top articles from the topics helper.

    0
  • Patrick Harland-Lee

    Yep it'd be great to know how to get it working in Community!

    0
  • Karen Snyder

    Patrick Harland-Lee

    Topics contain posts, so if you changed category to topic and article to post in the code, that could help you find the solution.

    0

Please sign in to leave a comment.

Powered by Zendesk