Popular Articles
The issue with this, is the articles which show are statically set in the Popularity field when we create/edit each KA. our management would prefer to have this list show the articles which have been visited the most. I have done some quick investigating and noticed that on the Cireson Knowledge article 1273, the Popular Articles section dynamically shows the Articles with the most views. Brilliant!!!
The code I have which returns the Top KA's is below, but I'm not sure how to change this into something which will return the Popular Articles.
Can anyone re-word this code to show the Popular Articles? I haven't been able to find a data-template named "pop-KA" or anything similar which may give me what I'm looking for.
Thanks for the help
Best Answer
-
john_doyle Cireson Support Ninja IT Monkey ✭✭✭✭Hi Matthew,
It looks like you are trying to manipulate the code on the original Home page. That page has been superseded twice in the portal. The Popular Articles page you are looking for is on the most recent Home page. You will find the various Home pages under Admin Settings > Navigation Settings on the drop-down menu in the top right-hand corner of the portal.
As stated previously, the most viewed articles are not part of the original Home page, but you can get them by making a call to the API:$.getJSON('/api/V3/Article/GetTopArticlesByViewCount?count=5',function(data){do stuff with the data returned from the server;});
You can also get the top knowledge articles by calling this API and avoiding all of the manipulation you are doing in your original script:<br><pre class="CodeBlock"><code>$.getJSON('/api/V3/Article/GetTopArticlesByPopularity?count=5',function(data){do other stuff with the data returned from the server;});
I would recommend using these two calls to get the articles you need.
5
Answers
It looks like you are trying to manipulate the code on the original Home page. That page has been superseded twice in the portal. The Popular Articles page you are looking for is on the most recent Home page. You will find the various Home pages under Admin Settings > Navigation Settings on the drop-down menu in the top right-hand corner of the portal.
As stated previously, the most viewed articles are not part of the original Home page, but you can get them by making a call to the API:
You can also get the top knowledge articles by calling this API and avoiding all of the manipulation you are doing in your original script:
<br><pre class="CodeBlock"><code>$.getJSON('/api/V3/Article/GetTopArticlesByPopularity?count=5',function(data){do other stuff with the data returned from the server;});
I would recommend using these two calls to get the articles you need.