# Toggling the display of a page configuration docked view

**URL:** <https://forum.inductiveautomation.com/t/toggling-the-display-of-a-page-configuration-docked-view/76407>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [July 14, 2023, 7:10pm UTC](https://forum.inductiveautomation.com/t/toggling-the-display-of-a-page-configuration-docked-view/76407 "2023-07-14T19:10:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [July 14, 2023, 7:10pm UTC](https://forum.inductiveautomation.com/t/toggling-the-display-of-a-page-configuration-docked-view/76407/1 "2023-07-14T19:10:19Z")

</div>

I've created an "announcement" view to be used as a thin ribbon at the bottom of my Page Configuration Shared Settings. I want the user to be able to dismiss it for the rest of the session once they've read it. (It turns back on if the text changes.)

![Bottom dock visibility](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/6/b636436b7c67443fda8e595cf49746854ea701bb.gif)

How can I get the bottom docked view to collapse to zero height on setting of `view.custom.hide`?

Many thanks.

---

<div class="post-metadata">

**Author:** ![aaronrai24](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aaronrai24/32/87248_2.png) [@aaronrai24](https://forum.inductiveautomation.com/u/aaronrai24)\
**Post date:** [July 14, 2023, 8:04pm UTC](https://forum.inductiveautomation.com/t/toggling-the-display-of-a-page-configuration-docked-view/76407/2 "2023-07-14T20:04:34Z")

</div>

Maybe a value changed script on `view.custom.hide` that calls [`system.perspective.closeDock`](https://docs.inductiveautomation.com/display/DOC81/system.perspective.closeDock)?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [July 14, 2023, 10:46pm UTC](https://forum.inductiveautomation.com/t/toggling-the-display-of-a-page-configuration-docked-view/76407/3 "2023-07-14T22:46:15Z")

</div>

That's it! I have read through that section of the online manual quite a bit in the last few months and hadn't mentally registerd closeDock() or openDock().

That was easy!

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 16, 2023, 1:22am UTC](https://forum.inductiveautomation.com/t/toggling-the-display-of-a-page-configuration-docked-view/76407/4 "2023-07-16T01:22:00Z")

</div>

Ahem, wrong post marked as solution? 😜

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [July 16, 2023, 7:32am UTC](https://forum.inductiveautomation.com/t/toggling-the-display-of-a-page-configuration-docked-view/76407/5 "2023-07-16T07:32:52Z")

</div>

> [@nminchin](#):
>
> wrong post marked as solution?

Fixed thanks, Nick.

I've run into a related problem though. I'm storing the announce text as `prevText` in a session variable for comparison with the current value when changing page. The idea is that I keep the dock hidden if the text is the same but it pops open again every time.

When the docked view is in the shared page configuration does it get reloaded when chaning pages? My left and top docks don't seem to flicker so I suspect not.

I'll play with it some more and see if I can define the problem better.

---

<div class="post-metadata">

**Author:** ![aaronrai24](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aaronrai24/32/87248_2.png) [@aaronrai24](https://forum.inductiveautomation.com/u/aaronrai24)\
**Post date:** [July 16, 2023, 7:12pm UTC](https://forum.inductiveautomation.com/t/toggling-the-display-of-a-page-configuration-docked-view/76407/6 "2023-07-16T19:12:55Z")

</div>

Hmm, in my test I found that if I close the dock and navigate to a different page, the dock will open again. If I close the dock and then navigate to the view rather than the page it maintains its closed state. So in your navigation, whether script or event I'd try to navigate to the view rather than a page([system.perspective.navigate - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.perspective.navigate)) or the event:

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

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [July 16, 2023, 7:42pm UTC](https://forum.inductiveautomation.com/t/toggling-the-display-of-a-page-configuration-docked-view/76407/7 "2023-07-16T19:42:42Z")

</div>

Thanks for that suggestion. Unfortunately I've configured a Perspective Tree to act as a menu. Selecting an item on the tree sets the tree's `props.selectionData.0.value.url : /page/parameter` as created in the Page Configuration screen.

The onClick event looks like this:

```auto
def runAction(self, event):
    import urllib

    pagePath = self.props.selectionData[0].value.u
    system.perspective.navigate(urllib.quote(pagePath))

```

so I'm not sure how to work around this.

Navigating to a page has the advantage that the URL updates, it can be bookmarked and shared and shows up in the history. According to the manual all of this is lost if navigating directly to the view and I suspect that the docks wouldn't display either.

There must be something I can do to keep the "hide" status in the session variables. I'll keep trying.
