Magistar Posted September 16, 2019 Share Posted September 16, 2019 The current most read KB articles seems to be 5. I would like to increase this to 10. I checked the templates: {if $kbmostviews} <h2>{$LANG.knowledgebasepopular}</h2> <div class="kbarticles"> {foreach from=$kbmostviews item=kbarticle} <a href="{routePath('knowledgebase-article-view', {$kbarticle.id}, {$kbarticle.urlfriendlytitle})}"> <span class="glyphicon glyphicon-file"></span> {$kbarticle.title} </a> {if $kbarticle.editLink} <a href="{$kbarticle.editLink}" class="admin-inline-edit"> <i class="fas fa-pencil-alt fa-fw"></i> {$LANG.edit} </a> {/if} <p>{$kbarticle.article|truncate:100:"..."}</p> {/foreach} </div> {/if} But it looks like there is no way to change the loop number there. Can this be done somewhere else? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 16, 2019 Share Posted September 16, 2019 11 minutes ago, Magistar said: Can this be done somewhere else? sadly, it will be hardcoded to return a maximum of 5 articles. the solution would be a ClientAreaPageKnowledgebase hook that recreates $kbmostviews - it should just be a query of the tblknowledgebase db table, sorted by views in descending order, with a limit of 10.... one part of the result might need a little tweak to follow the existing array though. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.