Knowledge Management

Get Involved. Join the Conversation.

Topic

    Pavel Franger
    Widget - TopAnswers - Change Summary to QuestionAnswered
    Topic posted November 19, 2018 by Pavel FrangerRed Ribbon: 250+ Points 
    28 Views, 9 Comments
    Title:
    Widget - TopAnswers - Change Summary to Question
    Summary:
    Currently TopAnswers displays the Summary field. I would like it to display the Question field instead. What's the best way to do this?
    Content:

    Hi everyone,

    The TopAnswers widget currently displays the Summary field in an FAQ. I am trying to have the widget display the Question field instead.

    Can anyone help me with what steps i need to take to have the Question field display instead of Summary?

    What i have so far is a custom widget which is extending from TopAnswers which is displaying Summary.

    Thank you in advance.

    Best Comment

    Carl Elliott

    You need to create a custom TopAnswers report and change the fields displayed in the report.  Then change your widget to point to that new report id. 

    Comment

     

    • Carl Elliott

      You need to create a custom TopAnswers report and change the fields displayed in the report.  Then change your widget to point to that new report id. 

    • Pavel Franger

      Hi Carl,

      I was really hoping that would be the answer however i can't find the report id it uses by default. Usually i find this out when i try creating then extending a widget but after reviewing the attributes i didn't find a report id associated with it.

      Any advice how to locate the report id?

      Please see a screenshot of what attributes i see when i try to extend the TopAnswers widget.

      Pav.

    • Carl Elliott

      Pavel, That is the way most of the widgets that use reports work.  I checked with my developers and they said that TopAnswer widget is locked down and there is not a lot you can do with it.  To achieve what you want you would have to create your own custom multi-line widget that used your own report.  Sorry about that. 

      • Pavel Franger

        Hi Carl,

        No problem at all. Thanks so much for the information. I will go down the custom multi-line path to acheive what we need.

        Pav.

    • Anthony Smith

      To add to what Carl said, here are some details - in a way the multi-line widget is tons easier to use anyway:

      1. Create a report that sorts answers by usage (select the date range you want to report on, etc, like a standard "page views" report just sorted by the number of views). You need to hide 2 columns: 1 is answers.a_id which which will allow you to hyperlink, and another one is your sum of views which will allow you to sort from top highest (see the sample report I attached below).
      2. Add this code to your page: <rn:widget path="reports/Multiline" report_id="100000"/> 
        (The report ID is the ID of the report you've created above)

      Here is the sample report: https://drive.google.com/open?id=1_M7-DB3ffhVTJ462CSFHKGev1QVwm4Ix