# Get URL of current page

**URL:** <https://forum.inductiveautomation.com/t/get-url-of-current-page/103609>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [March 13, 2025, 12:25am UTC](https://forum.inductiveautomation.com/t/get-url-of-current-page/103609 "2025-03-13T00:25:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gilberto\_Diaz](https://avatars.discourse-cdn.com/v4/letter/g/e36b37/32.png) [@Gilberto\_Diaz](https://forum.inductiveautomation.com/u/Gilberto_Diaz)\
**Post date:** [March 13, 2025, 12:25am UTC](https://forum.inductiveautomation.com/t/get-url-of-current-page/103609/1 "2025-03-13T00:25:35Z")

</div>

My use case is to configure a page with a route with the primary component. When that component loads, I need to get the URL value I set in the configuration. I have been looking at `system.perspective.getProjectInfo()` and `system.perspective.getSessionInfo()`. The issue with the `.getProjectinfo()` is that returns all the pages configurations, but I want to know which one is the current one. And the `.getSessionInfo()` returns all the active sessions in the gateway.

Is there a way to get just the current page URL?

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [March 13, 2025, 12:36am UTC](https://forum.inductiveautomation.com/t/get-url-of-current-page/103609/2 "2025-03-13T00:36:08Z")

</div>

> [@Text showing incorrect information](https://forum.inductiveautomation.com/t/text-showing-incorrect-information/90818/4):
>
> I believe page.props.path is what you want.

Bind that to a view custom property. Read that property on change.

---

<div class="post-metadata">

**Author:** ![Gilberto\_Diaz](https://avatars.discourse-cdn.com/v4/letter/g/e36b37/32.png) [@Gilberto\_Diaz](https://forum.inductiveautomation.com/u/Gilberto_Diaz)\
**Post date:** [March 13, 2025, 12:48am UTC](https://forum.inductiveautomation.com/t/get-url-of-current-page/103609/3 "2025-03-13T00:48:11Z")

</div>

The URL I set in the Page Config was, let me say `/test2`. When I use either `self.page.props.path` or create a `root.CUSTOM.url` and create a binding to it with `page.props.path`, both scenarios are returning `/` instead of `/test2`.

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [March 13, 2025, 3:48pm UTC](https://forum.inductiveautomation.com/t/get-url-of-current-page/103609/4 "2025-03-13T15:48:01Z")

</div>

Can you show the [page configuration](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/pages-in-perspective#page-configuration) for this view? Is `test2` a parameter value that you are passing in?

---

<div class="post-metadata">

**Author:** ![Gilberto\_Diaz](https://avatars.discourse-cdn.com/v4/letter/g/e36b37/32.png) [@Gilberto\_Diaz](https://forum.inductiveautomation.com/u/Gilberto_Diaz)\
**Post date:** [March 13, 2025, 6:03pm UTC](https://forum.inductiveautomation.com/t/get-url-of-current-page/103609/5 "2025-03-13T18:03:09Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/7/e74801fd0861614ebfcda9aea8aeee08ffaa552a.png)  
Yes, the `Page URL` is `/test2`. So my guess is that when this view loads, `self.page.props.path` should return `/test2`, similarly with `/test1`.

---

<div class="post-metadata">

**Author:** ![Sameer\_Ambegaonkar](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Sameer\_Ambegaonkar](https://forum.inductiveautomation.com/u/Sameer_Ambegaonkar)\
**Post date:** [June 8, 2026, 2:18am UTC](https://forum.inductiveautomation.com/t/get-url-of-current-page/103609/6 "2026-06-08T02:18:28Z")

</div>

Facing the same problem when trying to read the current page url. Always returns /. I believe this is dynamic and should return the url of the page which is being viewed in the browser.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/a/3a58a3b58de2d083085998fac84ebe5f47c6d3fa.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/6/86fff04b80521b013dcb4c796fed9e56dd8221b0.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 8, 2026, 2:38am UTC](https://forum.inductiveautomation.com/t/get-url-of-current-page/103609/7 "2026-06-08T02:38:30Z")

</div>

Test in a real client, not in the designer, with a label.

---

<div class="post-metadata">

**Author:** ![Sameer\_Ambegaonkar](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Sameer\_Ambegaonkar](https://forum.inductiveautomation.com/u/Sameer_Ambegaonkar)\
**Post date:** [June 8, 2026, 4:59am UTC](https://forum.inductiveautomation.com/t/get-url-of-current-page/103609/8 "2026-06-08T04:59:31Z")

</div>

Thanks for the reply. Got it working.
