
Aman Singh_
Kilo Sage
Options
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 07-31-2022 11:45 PM
Problem Statement:
When we search content items in typeahead search then the icon is not visible.
To illustrate here is my content item
It has the icon attached to it.
Let us search this in our Service Portal and see what is available to us OOB.
So we don't see the icon getting displayed.
If there is a requirement in which they want to see the icon then we can fulfill this through following Steps:
- The OOB configuration can be found in Search Source module, so we will be manipulating that for our purpose. Go to Service Portal< Search Sources
- Open the record named Catalogs.
- In the search page template add the piece of code below this line of code<i class="fa m-r-sm fa-file-text-o"></i>
<i ng-if="item.icon" class="ta-img" style="background-image:url('{{item.icon}}?t=small') ; width: 30px; height: 30px; line-height: 20px; background-size: contain; display: inline-block; background-repeat: no-repeat; background-position: center center; text-align: center; float:left; padding-right: 8px;"></i>
<i ng-if="!item.icon" class="fa m-r-sm fa-file-text-o"></i>
The updated template would be something like below
Make sure you have commented the line {<i class="fa m-r-sm fa-file-text-o"></i>}.
After the update made, click save and give it a search again.
We have the associated icon displayed.
Hope this helps, Happy Learning.
Labels:
- 1,321 Views