Category Description | Community
Skip to main content

Category Description

  • October 11, 2016
  • 7 replies
  • 0 views

I want to add a list of FAQs on each category page. Each list will be different. Is javascript the only way to do this? Or can it be done with curlybars? I do not see it in the category page helpers https://developer.zendesk.com/apps/docs/help-center-templates/category_page

The "description" of the article needs to have HTML enabled. This would be really helpful for many customers. Is that possible?

This topic has been closed for replies.

7 replies

  • Author
  • October 11, 2016

ModeratorWes

@Sam - Since the FAQ's will be different I would just do them all manually via HTML then use JQuery or Curlybars to show them based on which category you are in.

This article will get you started and if you get stuck along the way just let me know.  The same logic applies but the jquery will be a little different and of course and you can use the curlybars.


  • Author
  • October 18, 2016

@Wes at first I used jquery for this, but in the end I found it was easier to use category IDs in curly bars to do this. 

 

It seems it would be beneficial for zendesk to allow an HTML editor for category pages (like article pages) - I am not the only user to request this. 


Like many others I needed HTML in the section and category descriptions. Here's a hack to achieve this.

Insert this line in your JS, in the $(document).ready section:

 $(".page-header-description").html($(".page-header-description").text());

The line 'unescapes' the description and activates the HTML. Now you can use HTML tags in your section descriptions.

Disclaimer: this works with Copenhagen theme, but may not work with other themes because it relies on the 'page-header-description' to retrieve the content of the section description.


  • September 11, 2017

@Chris,

Awesome tip, thanks for sharing!! Even if not using Copenhagen it will work just by changing ".page-header-description" to the section description class name used in the theme.


  • August 14, 2018

Thanks Chris!

 


@Chris, big thanks!