Aman Singh_
Kilo Sage

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.find_real_file.png

 

Let us search this in our Service Portal and see what is available to us OOB.

find_real_file.png

 

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:

  1. The OOB configuration can be found in Search Source module, so we will be manipulating that for our purpose. Go to Service Portal< Search Sourcesfind_real_file.png
  2. Open the record named Catalogs.find_real_file.png
  3. 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

find_real_file.png

 

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.

find_real_file.png

We have the associated icon displayed.

 

Hope this helps, Happy Learning.

 

 

Version history
Last update:
‎07-31-2022 11:45 PM
Updated by: