# Persistent Page Titles in Perspective

**URL:** <https://forum.inductiveautomation.com/t/persistent-page-titles-in-perspective/103626>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 13, 2025, 1:54pm UTC](https://forum.inductiveautomation.com/t/persistent-page-titles-in-perspective/103626 "2025-03-13T13:54:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob\_Clark](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Jacob\_Clark](https://forum.inductiveautomation.com/u/Jacob_Clark)\
**Post date:** [March 13, 2025, 1:54pm UTC](https://forum.inductiveautomation.com/t/persistent-page-titles-in-perspective/103626/1 "2025-03-13T13:54:11Z")

</div>

Hello guys,

I've been trying to figure out a way to dynamically set the title of a page and keep the title on refresh. I took a look at [this forum post](https://forum.inductiveautomation.com/t/page-titles-in-perspective/43539) where they suggest using an onStartup script to set the page title. The problem is once the page is refreshed the title reverts back to what the name is in the page configuration

---

<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:** [March 13, 2025, 2:32pm UTC](https://forum.inductiveautomation.com/t/persistent-page-titles-in-perspective/103626/2 "2025-03-13T14:32:59Z")

</div>

Interesting.

If you have a shared docked view, you could add two custom properties for current title and desired title. Bind the current title to `page.props.title`. Add change scripts to both that check for matching strings. Copy from desired to current when not equal.

Everywhere that you are currently setting `page.props.title`, send a message to the docked view to change `view.custom.desiredTitle` instead.

FWIW, this behavior could be leveraged to make a reliable refresh event detector, which is highly desired by some users.

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [March 14, 2025, 10:56pm UTC](https://forum.inductiveautomation.com/t/persistent-page-titles-in-perspective/103626/3 "2025-03-14T22:56:22Z")

</div>

Thanks, this might be useful to more reliably retrieve (unchanged) values of parameters after a refresh and re-inject them into urlParams

I wish your pageVarMap() function was a built-in!

---

<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:** [March 14, 2025, 10:58pm UTC](https://forum.inductiveautomation.com/t/persistent-page-titles-in-perspective/103626/4 "2025-03-14T22:58:36Z")

</div>

> [@hunterdg](#):
>
> built-in!

Well, I don't, as you might suspect. The most useful functions provide the most motivation to crack the anti-3rd-party-module foolishness.

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [March 17, 2025, 5:59pm UTC](https://forum.inductiveautomation.com/t/persistent-page-titles-in-perspective/103626/5 "2025-03-17T17:59:41Z")

</div>

here’s an example comparison/what I came up with (on a RadioGroup custom prop) to coordinate a docked radio button with a urlParam referenced by main view (binding json)

> **binding**
>
> ```json
> {
> "type": "expr-struct",
> "config": {
> "struct": {
> "radio": "{this.props.value}",
> "url": "{page.props.urlParams.Type_ID}"
> },
> "waitOnAll": true
> }
> }
> 
> ```

> **change script**
>
> ```python
> if not hasattr(self.page.props.urlParams, 'Type_ID') or self.page.props.urlParams.get('Type_ID') != self.props.value:
> self.page.props.urlParams.Type_ID = self.props.value
> 
> ```

~~This won't write `null` to the urlParam when a radio button with value of `null` is selected... I’m sure the reason is obvious but I’m sick of staring at it so I added a change script on `radio.props.value` for that edge case.~~

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [March 20, 2025, 11:37pm UTC](https://forum.inductiveautomation.com/t/persistent-page-titles-in-perspective/103626/6 "2025-03-20T23:37:07Z")

</div>

@Jacob_Clark - saw you hearted this - I found the previous example could introduce a race condition when switching from a non-null value to a null value, so I’ve updated it.
