Home Analyst Portal

How can we have all the KB articles displayed when you go to the portal?

Bryant_RichardsBryant_Richards Customer IT Monkey ✭
When we go to our portal and try to view the KB, it will only show the Top Articles and you have to search for the rest. How do we get all of our articles to appear on the page for viewing by end users?

Answers

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    Hi @Bryant_Richards

    This is by design as once you build up a number of KB articles, it will be difficult to find the one a user needs in a list. They can search at the top or browse by category on the right hand side which will then show all the articles in that category in one list.

    Geoff
  • Morten_MeislerMorten_Meisler Premier Partner Advanced IT Monkey ✭✭✭
    edited December 2017

    A little late answer here, but default it only shows TOP 5 result, but at the backend it actually loads in TOP 10 (this can be tweaked in the stored procedure as well to load in more), but what I did was to show all TOP 10 in two columns - replacing topRO's (since this was not used in our case).

    Here is the code in custom.js you can modify for your needs:



    /* Extend Top knowledge articles */
    $(document).ready(function (formObj){
    	
    	if(window.location.pathname.indexOf("/View/02efdc70-55c7-4ba8-9804-ca01631c1a54") > -1) {
    		setTimeout(function(){
    			var $last5KA = $("[data-template='top-ka']").find(".media.sc-top-item").slice(-5);
    			var $topRO = $("[data-template='topfav-request-offerings'][data-bind='source: topROs']");
    			$topRO.append($last5KA);
    			$("[data-bind='visible: topRO']").show();
    
    			//Rearrange
    			var $topROdiv = $($("[data-bind='visible:topsVisible'] > div")[2]);
    			$topROdiv.find("h4").text(""); //remove text
    			$topROdiv.css("margin-top","1%"); //Adjust margin since it readjust when text is gone
    			/
    			$topROdiv.insertBefore($($("[data-bind='visible:topsVisible'] > div")[1]));
    			
    			
    		},2000);
    	
    	}
    
    });
    

    I'm using alternative homepage here. The end-result should be knowledge articles showing in two columns instead of one, and then the favorite offerings is placed in the last right column.

    Edit:

    Just to clarify, the stored procedure is called: spGet_TopKnowledgeArticleByPopularity and in the file CiresonPortal\Scripts\viewPanels\alternateSC\controller.js the API call is found with the number 10. The code here could most likely be replicated and placed in custom.js instead and then increase the number / change to MAX.

    On a side-note there is also an interesting sp called spGet_TopKnowledgeArticleByViewCount. I tried changing the API call to that instead, but it doesn't seem to work (maybe the API method is not made/not working, the sp works fine).It would be very nice to have the option to sort top KBs by viewcount instead of a predefined popularity.

    Using portal version 8.2

Sign In or Register to comment.