Display articles from specific Solutions categories and filter by most popular

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.


2 people like this idea

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.

Login or Signup to post a comment