The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Nikhil Sharma1
ServiceNow Employee
ServiceNow Employee

Question

How to configure the title and summary/description font sizes for AI Search results in Service Portal?

 

Answer

The title and summary font sizes for search results are not configurable through CSS but it can be configured through the EVAM view configurations. Following are the properties for configuring title and summary font sizes:

 

  •  titleFontSize: Configures the title font size for search results. Default value is “lg” which stands for large (20px)
  •  summaryFontSize: Configures the description/summary font size for search results. Default value is “sm” which stands for small (12px)

 

For both above properties the available configuration values are:

  • Small – “sm” (12px)
  • Medium – “md” (16px)
  • Large – “lg” (20px)
  • Extra-large – “xl” (24px)

 

You can configure these values from the EVAM configuration bundle for Service Portal. The steps to do so are as follows:

  1. Go to ‘EVAM Definitions’ from the navigator.
  2. Select the ‘Service Portal Search’ record from the list of EVAM Definitions.
  3. Under the EVAM Definition in the related list for ‘EVAM View Config Bundle M2Ms’, click on ‘Service Portal Search Bundle’.
  4. Under the ‘Service Portal Search Bundle’ you’ll see a list of view configurations for search results from different sources.
  5. Select the EVAM view configuration for relevant search result, for example - Knowledge Search Results.
  6. Open the view template for the result. For example, the view template for ‘Knowledge Search Results’ is ‘Knowledge Search Template’.
  7. In the JSON under Template, you can configure the above mentioned two properties to change the title and summary font size for Knowledge search results and click ‘Update’ to save your configuration (see screenshot below). Once this is saved, you can refresh the Service Portal results page to see the font size update.
  8. Repeat the steps 5-7 for any other types of search results you want to change the text size for.

title-summary-font-sizes.png

 

Comments
Aman_Prabhakar
Tera Contributor

Hello Nikhil,

@Nikhil Sharma1 

Thank you for this article, it helped us in achieving our goal.

However, we would also like to change the tile size fo the search result itself.

Is there a similar property for the same?

 

I was not able to find one in the offical documents.

Neither was I able to find the property given by you in this post.

Is there a way to find out these properties?

 

Kind regards.

Version history
Last update:
‎11-17-2022 10:29 AM
Updated by:
Contributors