Creating tree structure in the knowledge base category on the service portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2017 12:41 AM
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.
Best regards,
- Labels:
-
Knowledge Management
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2017 01:19 PM
has anyone found an answer to this question?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2017 01:38 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2023 12:25 PM
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
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)