Display articles from specific Solutions categories and filter by most popular

  • 15 September 2016
  • 4 replies
  • 314 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.



This topic has been closed for comments

4 replies


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.



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!



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