Skip to main content

Display articles from specific Solutions categories and filter by most popular

  • September 15, 2016
  • 4 replies
  • 389 views


Hello, I'm looking to customize a section of our Freshdesk support homepage, but I need some assistance. 




What I would like to do is have a 'Popular Articles' section that shows 5 most popular articles. I'm hoping I can do two things to accomplish this.




  1. Show 5 articles from specific Solutions categories that I define (not all categories).


  2. Filter the results based on the most popular article (i.e. most visited articles).




So far all I can seem to do is...


{% for article in portal.recent_articles limit:5 %}

...which shows the 5 most recent articles from all categories. This is a start, but not what I want.


Did this topic help you find an answer to your question?
This topic has been closed for comments

4 replies

  • Community Debut
  • 1 reply
  • November 3, 2016

Just in case anyone finds this valuable, I've got part of the solution for this. 


{% for category in portal.solution_categories %}
{% for folder in category.folders %}
{% if folder.id == 14000105885 %}
{% for article in folder.articles limit:5 %}
{{article.title}}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}


 This gives you the 5 most recent articles in that category (folder). It doesn't do the second part, but I'm working on that right now.



  • Apprentice
  • 2 replies
  • December 31, 2016

Hello Mike,



If you are interested in customization of Freshdesk templates, we can help you. Our company Breezy Themes specialize on ready-for-use premium Freshdesk templates. You can visit our site
www.breezythemes.com and fill the question form. Our technical team will contact you and help with any question. Or contact us by hello@breezythemes.com.



Thanks!



  • Community Debut
  • 2 replies
  • February 14, 2018

Hi anyone finds most popular article (i.e. most visited articles) HTML code.



Hi,

I am also interested in displaying the most viewed articles on the homepage. I do not particularly need it to be filtered by category. Does anyone have a solution for implementing this in freshdesk?

Thanks