Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

add image on icon link widget,How can we do that?

Varsha21
Giga Guru

Hello Team,

I want to add the image at the top and below a description for the link, it can be like an icon link widget.

e.g. like

How can we do that?

I have gone through the below links but did not get a solution.

http://conyxit.com/custom-glyph-in-servicenow-portal-icon-link-widget/

http://sn.sptrac.com/?p=155

https://community.servicenow.com/community?id=community_question&sys_id=fc924ae61b048c18d01143f6fe4b...

 

Thanks in advance.

1 ACCEPTED SOLUTION

Pranav Bhagat
Kilo Sage

Try this 

Upload the image in images table.

  <!--// Circle Icon -->
  <a ng-if="::(options.link_template == 'Circle Icon')" ng-href="{{::data.href}}" class="circle_icon {{::options.class_name}} text-{{::options.color}}" target="{{::data.target}}">
    
<img src="<imagename>.jpg" width="500" height="600">
<span class="fa fa-stack fa-2x">
      <i class="fa fa-circle fa-stack-2x"></i>
      <i class="fa fa-{{::options.glyph}} fa-stack-1x fa-inverse"></i>
    </span>
    <h2>{{::options.title}}</h2>
    <span class="text-muted">{{::options.short_description}}</span>
  </a>

 

 

Regards

Pranav

View solution in original post

5 REPLIES 5

Pranav Bhagat
Kilo Sage

Try this 

Upload the image in images table.

  <!--// Circle Icon -->
  <a ng-if="::(options.link_template == 'Circle Icon')" ng-href="{{::data.href}}" class="circle_icon {{::options.class_name}} text-{{::options.color}}" target="{{::data.target}}">
    
<img src="<imagename>.jpg" width="500" height="600">
<span class="fa fa-stack fa-2x">
      <i class="fa fa-circle fa-stack-2x"></i>
      <i class="fa fa-{{::options.glyph}} fa-stack-1x fa-inverse"></i>
    </span>
    <h2>{{::options.title}}</h2>
    <span class="text-muted">{{::options.short_description}}</span>
  </a>

 

 

Regards

Pranav

Thank you Pranav,

It worked.

Pravallika1
Giga Guru

@Pranav Bhagat 

I had the same requirement in my project and used the same solution.

Adding the line 

<img src="<imagename>.jpg" width="500" height="600">

in Circle Icon didnt work for me instead it worked when I added it on Top Icon , but the image is not loaded.

find_real_file.png

Please help me with what I am missing..

Hey Pravallika,

You need to replace the "<imagename>.jpg" with your image name.

Make sure to add the image into the db_image table before replacing it.

<img src="<imagename>.jpg" width="500" height="600">

Make sure to mark this helpful if done.

Thanks 

Cheers!