How to embed a url onto a service portal?

barron
Kilo Contributor

Let's say I want to include a preview of a website (say, a twitter profile or a youtube video) onto my service portal, what's the best avenue for doing this? I assume it's a type of widget, but I can't quite tell.

Thanks

1 ACCEPTED SOLUTION

rakesh_ravi
ServiceNow Employee
ServiceNow Employee

You can create a new widget and inside the HTML part for the widget, you can include the piece of code which pulls in the content from youtube.


For example if you want to include a video from youtube, you can use the following code inside the widget HTML (this code will be provided the content hosting service, in this case it is youtube).



<iframe width="560" height="315" src="https://www.youtube.com/embed/K7niFZmGawM" frameborder="0" allowfullscreen></iframe>



Hope this helps.



Thanks,


Rakesh


View solution in original post

7 REPLIES 7

ian_cox
ServiceNow Employee
ServiceNow Employee

We have done this on our service portal let me see if I can get some help.


RajNow
ServiceNow Employee
ServiceNow Employee

Hi rakesh_ravi Can you provide some examples here ?


Thanks


rakesh_ravi
ServiceNow Employee
ServiceNow Employee

You can create a new widget and inside the HTML part for the widget, you can include the piece of code which pulls in the content from youtube.


For example if you want to include a video from youtube, you can use the following code inside the widget HTML (this code will be provided the content hosting service, in this case it is youtube).



<iframe width="560" height="315" src="https://www.youtube.com/embed/K7niFZmGawM" frameborder="0" allowfullscreen></iframe>



Hope this helps.



Thanks,


Rakesh


Thanks, Rakesh. Do I need to do anything else to the HTML part or the client or server scripts? I have this in the HTML part:



<div>


<iframe width="560" height="315" src="https://www.youtube.com/embed/K7niFZmGawM" frameborder="0" allowfullscreen></iframe>


</div>



Everything else I left as it appeared when you create a new widget. However, the preview window is blank.