How can we add icons to categories widget in service portal

pree
Mega Contributor

How can we add icons to   categories as shown below for service portal Istanbul version.Where do we need to customize in SC Categories widget under spCategoryListItem

find_real_file.png

1 ACCEPTED SOLUTION

Creating a new widget from scratch may actually be a better approach since the OOB widget has a lot of complex logic, and also relies on an Angular Provider.



That being said, if you're just looking for the quickest way to add images, you can do the following:


Screen Shot 2018-01-11 at 9.09.48 PM.png


The two lines I changed are highlighted. You'll also need to add some styles for the "icon" class. I used:


Screen Shot 2018-01-11 at 9.16.04 PM.png


This will render the categories as follows:


Screen Shot 2018-01-11 at 9.08.34 PM.png



However, please keep in mind that the Angular Provider you're modifying is a shared resource and WILL impact ANY widget that's using it!


For that reason, I would recommend just creating your own widget that doesn't use the Angular Provider, especially if you don't need all the features the OOB offers.



Hope that helps!


View solution in original post

3 REPLIES 3

pree
Mega Contributor

nathanfirth any help or pointers would be appreciated.


Creating a new widget from scratch may actually be a better approach since the OOB widget has a lot of complex logic, and also relies on an Angular Provider.



That being said, if you're just looking for the quickest way to add images, you can do the following:


Screen Shot 2018-01-11 at 9.09.48 PM.png


The two lines I changed are highlighted. You'll also need to add some styles for the "icon" class. I used:


Screen Shot 2018-01-11 at 9.16.04 PM.png


This will render the categories as follows:


Screen Shot 2018-01-11 at 9.08.34 PM.png



However, please keep in mind that the Angular Provider you're modifying is a shared resource and WILL impact ANY widget that's using it!


For that reason, I would recommend just creating your own widget that doesn't use the Angular Provider, especially if you don't need all the features the OOB offers.



Hope that helps!


vaibhavbhatnaga
ServiceNow Employee
ServiceNow Employee