# Resource Path Problem

**URL:** <https://forums.realmacsoftware.com/t/resource-path-problem/47311>\
**Category:** Elements API\
**Created:** [April 25, 2025, 9:42pm UTC](https://forums.realmacsoftware.com/t/resource-path-problem/47311 "2025-04-25T21:42:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/bill/32/107_2.png) [@Bill](https://forums.realmacsoftware.com/u/Bill)\
**Post date:** [April 25, 2025, 9:42pm UTC](https://forums.realmacsoftware.com/t/resource-path-problem/47311/1 "2025-04-25T21:42:09Z")

</div>

@tpbradley @ben I was using a src="{{page.resourcesPath}}/… for a script call in the Body End section. I then tried moving the script into the Template area:

```auto
@portal(bodyEnd, includeOnce: true)
<script type="text/javascript" src="{{page.resourcesPath}}/...
</script>
@endportal

```

I looked at the page array and for some weird reason resourcesPath isn’t in there (I’m still on v0.7.7)

It’s throwing an error, so what variable can I use to get the path to resources?

---

<div class="post-metadata">

**Author:** ![tpbradley](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/tpbradley/32/25503_2.png) [@tpbradley](https://forums.realmacsoftware.com/u/tpbradley)\
**Post date:** [April 26, 2025, 10:37am UTC](https://forums.realmacsoftware.com/t/resource-path-problem/47311/2 "2025-04-26T10:37:59Z")

</div>

Hi @Bill,

We’ve renamed the property to better describe what it’s referring to. The new variable is `{{page.projectResourcesPath}}` and it’s available in build 0.7.9.

I’m not sure when it happened, but the `{{page.resourcesPath}}` was broken in a previous build.

You’ll also need to make the page object available to the template using the hooks file. Something like this.

```auto
const transformHook = (rw) => {
    // Make page object available to the template
    rw.setProps({
        page: rw.page
    });
}

exports.transformHook = transformHook;

```
