Creating tree structure in the knowledge base category on the service portal

rody-bjerke
Giga Guru

Hi,

Is there a easy way to create a tree structure in the knowledge base category list? (kb_categories)

For example something like this for the knowledge base:

Which shows the category and sub-categories in a tree like structure.

tree_view.png

Best regards,

3 REPLIES 3

Adrian Aguilar
Giga Expert

has anyone found an answer to this question?


Hi Adrian,



You can accomplish this by using Bootstrap.



Simple Sample example:


$(document).ready(function() {


      $('#tree').tree({


          dataSource: [


              { text: 'North America', children: [ { text: 'USA', children: [ { text: 'California' }, { text: 'Miami' } ] }, { text: 'Canada' },   { text: 'Mexico' } ] },


              { text: 'Europe', children: [ { text: 'France' },   { text: 'Spain' },   { text: 'Italy' } ] },


              { text: 'South America', children: [ { text: 'Brazil' },   { text: 'Argentina' },   { text: 'Columbia' } ] }


          ],


          width: 500,


          uiLibrary: 'bootstrap'


      });


});




It Would Look Like this



find_real_file.png


Aaron Stacken
Tera Contributor

I know this post is old but I hope this reply can help someone in the future. Sarup Paul posted a solution here.

1. Go to your service portal, CTRL + Right Click on the widget that shows the categories

AaronStacken_0-1694460049877.png

2. Click "Instance Options"

3. Enable "Show Category Hierarchy" and click the save button

(If you can't edit things in step 3, make sure you are in the right scope. If you scroll up you should see the info message at the top telling you that. I made my update set in the "Knowledge Management - Service Portal" scope)