- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2020 02:17 PM
Hello all,
Does anyone know how to hide the number shown next to Knowledge categories on the portal?
Thanks!
Mike
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2020 02:52 PM
Navigate to the designer view of KB_view2 page and open it in designer view. Click on Pen Icon in KB Categories - KBv3 and select Omit Badge counts.
This will remove the count from the widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2020 02:27 PM
I just discovered that I can hide the quantity by editing the "KB Categories KBv3" widget and selecting "Omit badge counts (can improve performance for large categories)". This does hide the quantity but once I click on any category the quantity for all categories is displayed again. Any ideas on how to permanently hide this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2020 02:30 PM
Hi,
You need to clone widget: KB Categories - KBv3 & then comment the line that has keyword "category.count" from Body HTML Field of the widget.
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2020 10:41 AM
Hi Jaspal, thanks for the response!
"category.count" appears in a few different places, do you which one specifically needs to be commented out? I tried a combination of options and can't get that count to hide.
------------------------------------------------------
<div ng-show="data.kb" ng-class="{'hidden-xs' : hideCategoryWidgetInXS}" class="panel panel-{{::c.options.color}} category-widget no-border" ng-if="::(data.show == true)">
<div class="panel-heading">
<h1 class="h4 panel-title" ng-bind="::c.options.title">
<fa ng-if="c.options.glyph" name="{{c.options.glyph}}" />
</h1>
</div>
<ul class="list-group category-list" role="list" aria-label="${Categories}">
<li role="listitem"
class="list-group-item text-overflow-ellipsis"
ng-include="'category-template.html'"
ng-repeat="category in c.data.categories track by category.value "
ng-if="category.count != 0">
</li>
</ul>
<div class="panel-footer text-center" ng-if="data.showMore">
<a href="javascript:void(0)" role="button" class="text-center" ng-click="loadMore()" >{{::data.showMoreMsg}}</a>
<div class="text-muted text-center">
{{data.loadAllMsg}}
</div>
</div>
</div>
<script type="text/ng-template" id="category-template.html">
<div ng-click="categorySelected(category)"
ng-enabled="category.count != 0"
tabindex="0"
class="group-item group-item-{{::options.color}}">
<i ng-if="::category.subcategories.length > 0"
class="l-h-1_6x pull-left fa"
ng-class="{true: 'fa-minus-square-o', false: 'fa-plus-square-o'}[category.showChildren]"
aria-label="{{category.showChildren? '${collapse category} ' + category.label : '${expand category} ' + category.label}}"
ng-click="displayChildren($event, category)"/></i>
<span ng-if="category.count > 0 && options.omit_badges != 'true'" class="badge pull-right pointer">{{::category.count}}</span>
<span class="block text-overflow-ellipsis category"
sn-focus="category.value == c.data.categoryId"
ng-class="{true: 'text-{{::options.color}}', false: ''}[category.value == c.data.categoryId]" id="{{::category.value}}"
title="{{::category.label}}">
{{::category.label}}
<span class="sr-only">${items}</span>
</span>
</div>
<ul class="list-group sub-category-list list-bg-{{::options.color}}"
role="list" aria-label="{{category.label}} ${subcategories}"
ng-if="category.showChildren && category.subcategories.length >0"
ng-class="{true: 'no-indent', false: ''}[category.level > 2]">
<li role="listitem"
class="list-group-item text-overflow-ellipsis"
ng-include="'category-template.html'"
ng-repeat="category in category.subcategories | orderBy: 'label' track by category.value "
ng-if="category.count != 0">
</li>
</ul>
</script>
------------------------------------------------------

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2020 12:53 PM
Hi,
Try replacing
<ul class="list-group category-list" role="list" aria-label="${Categories}">
<li role="listitem"
class="list-group-item text-overflow-ellipsis"
ng-include="'category-template.html'"
ng-repeat="category in c.data.categories track by category.value "
ng-if="category.count != 0">
</li>
</ul>
with
<ul class="list-group category-list" role="list" aria-label="${Categories}">
<li role="listitem"
class="list-group-item text-overflow-ellipsis"
ng-include="'category-template.html'"
ng-repeat="category in c.data.categories track by category.value">
</li>
</ul>
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.