"Explore Our Knowledge Bases" to Expand "Show All" by Default
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2022 05:44 AM
We would like to set our Knowledge Portal to auto expand the "Show All" for our knowledge bases. Is there a property that can make this change?
- Labels:
-
Knowledge Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2022 11:21 AM
Without cloning the "Knowledge Base Browse" widget and changing the default behavior, you can add the following CSS to the instance options of the OOB widget.
.kb-hide-me {
display: block;
}
.kb-show-more {
display: none;
}
The first block will show all knowledgebases as if you had clicked the "Show all +" button but it will also remove the ability to hide them, so the second block gets rid of the show/hide button completely.
This is the most OOB/Upgrade Friendly way to do it.
Alternatively you could clone the widget and change Client Controller script line 7 from "c.showMoreLink = true;" to "c.showMoreLink = false;"
Or, even more fancy, you could clone, add the following to the end of the "Option schema" array:
{"hint":"Show all by default","name":"show_all","default_value":"false","label":"Show All","type":"boolean"}
Add this line to the server script after "options.order_reverse = options.order_reverse ? options.order_reverse == 'true': false;":
options.show_all = options.show_all ? options.show_all == 'true': false;
Change Client Controller line 7 from
"c.showMoreLink = true;" to "c.showMoreLink = !c.options.show_all || true"
This will give you the ability to choose if you want to show all by default or not when using your new cloned widget.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 04:28 AM
Thanks, this worked!