# How to embed a script block to OpenOndemand html

**URL:** <https://discourse.openondemand.org/t/how-to-embed-a-script-block-to-openondemand-html/3016>\
**Category:** Get Help\
**Tags:** question\
**Created:** [October 12, 2023, 10:25pm UTC](https://discourse.openondemand.org/t/how-to-embed-a-script-block-to-openondemand-html/3016 "2023-10-12T22:25:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenny](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/kenny/32/1688_2.png) [@Kenny](https://discourse.openondemand.org/u/Kenny)\
**Post date:** [October 12, 2023, 10:25pm UTC](https://discourse.openondemand.org/t/how-to-embed-a-script-block-to-openondemand-html/3016/1 "2023-10-12T22:25:52Z")

</div>

Hello team, I am using the OpenOndemand ansible role to deploy our OpenOndemand portal, now we have a request that need to embed a script block to the bottom of the html body, so that we can change the status of the web portal, I am just wondering, what is the best practice to do this. thanks.

```auto
<script src="https://<company>.statuspage.io/embed/script.js"></script>

```

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [October 13, 2023, 4:59pm UTC](https://discourse.openondemand.org/t/how-to-embed-a-script-block-to-openondemand-html/3016/2 "2023-10-13T16:59:34Z")

</div>

You can either create a widget and have it display there. Looks like `custom_javascript_paths` is coming in 3.1.

OR - you can override or hack the `application.html.erb` to include it.

We distribute the file `application.html.erb` in `/var/www/ood/apps/sys/dashboard/app/views/layouts/application.html.erb`. You can edit this file directory (after backing it up!) or possibly supply an override at `/etc/ood/config/apps/dashboard/views/layouts/application.html.erb` that has your edits.

I believe the override is the better option.

---

<div class="post-metadata">

**Author:** ![Kenny](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/kenny/32/1688_2.png) [@Kenny](https://discourse.openondemand.org/u/Kenny)\
**Post date:** [October 13, 2023, 8:57pm UTC](https://discourse.openondemand.org/t/how-to-embed-a-script-block-to-openondemand-html/3016/3 "2023-10-13T20:57:09Z")

</div>

Thank you Jeff, I will check it out.

---

<div class="post-metadata">

**Author:** ![Kenny](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/kenny/32/1688_2.png) [@Kenny](https://discourse.openondemand.org/u/Kenny)\
**Post date:** [October 16, 2023, 8:19pm UTC](https://discourse.openondemand.org/t/how-to-embed-a-script-block-to-openondemand-html/3016/4 "2023-10-16T20:19:27Z")

</div>

Create override the file in /etc/ood/config/apps/dashboard/views/layouts/application.html.erb works great as expected, thanks Jeff.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [April 13, 2024, 8:20pm UTC](https://discourse.openondemand.org/t/how-to-embed-a-script-block-to-openondemand-html/3016/5 "2024-04-13T20:20:24Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
