# Menu Tree - Change actual navigation view

**URL:** <https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 20, 2025, 7:51pm UTC](https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118 "2025-01-20T19:51:29Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [January 20, 2025, 7:51pm UTC](https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118/1 "2025-01-20T19:51:29Z")

</div>

Hello, I wonder if should be possible to change the "actual" navigation of a menu tree in Perspective via script.

For example when I click a button I would like to open the menu tree in a sub-item view.

---

<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:** [January 20, 2025, 11:39pm UTC](https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118/2 "2025-01-20T23:39:02Z")

</div>

Leave the `target` property blank on the instance you want to show a sub menu, and add instances to the `items` property

> **[Perspective - Menu Tree | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-navigation-palette/perspective-menu-tree)**
>
> The Menu Tree component can be configured to allow users to navigate pages in a Perspective Session.

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [January 21, 2025, 8:53am UTC](https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118/3 "2025-01-21T08:53:28Z")

</div>

> [@ryan.white](#):
>
> Leave the `target` property blank on the instance you want to show a sub menu, and add instances to the `items` property
> 
> [Perspective - Menu Tree | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-navigation-palette/perspective-menu-tree)

The `items` property is already create and by default it opens from the main menu, for example

```python
Menu1
Menu2
Menu3

```

When I click a button I open the left docked of the menu tree navigation and I want to move in a subview, so I want to be here for example:

```python
Menu1 - Sub1
Menu1 - Sub2
Menu1 - Sub3

```

Thanks for the help

---

<div class="post-metadata">

**Author:** ![Fran\_Dujmovic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/fran_dujmovic/32/70280_2.png) [@Fran\_Dujmovic](https://forum.inductiveautomation.com/u/Fran_Dujmovic)\
**Post date:** [January 21, 2025, 9:06am UTC](https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118/4 "2025-01-21T09:06:12Z")

</div>

Isn't that the default way that the menu tree component behaves?

![MenuTree](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/3/a348c2d8007f4897ca7d1aeb817c628415bbe79b.gif)

As Ryan mentioned, you can just add instances to the items property to add more submenu items and set their respective targets to your views.

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [January 21, 2025, 10:55am UTC](https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118/5 "2025-01-21T10:55:19Z")

</div>

You must forgive me, but I don't think I was clear in my explanation.

The `Menu Tree` is already fully structured, and there is no need for me to add new submenu items.

Let me give a practical example to clarify. When I launch the application in the browser from scratch, a map opens where I can select the area of the world I want to navigate.

The `Menu Tree` has 4 initial items that correspond to 4 plants located in different parts of the world. When I click on the map, for example, in Asia, I would like to simulate the click on the `Asia` item of the menu tree via script so that the user is already in the submenu of that plant.

---

<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:** [January 21, 2025, 4:11pm UTC](https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118/6 "2025-01-21T16:11:39Z")

</div>

I don't think the menu tree has any way for you to programmatically 'click' on one of it's items.

You'll have to configure the map component with svgs or icons for the different facilities, and then use `system.perspective.navigate` in the `onMarkerClick` or `onVectorClick` actions on the map to navigate to your desired page.

> **[Perspective - Map Scripting | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-map/perspective-map-scripting)**
>
> This page details the various scripting, component, and extension functions available for Perspective's Map component.

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [January 21, 2025, 7:28pm UTC](https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118/8 "2025-01-21T19:28:58Z")

</div>

> [@ryan.white](#):
>
> You'll have to configure the map component with svgs or icons for the different facilities, and then use `system.perspective.navigate` in the `onMarkerClick` or `onVectorClick` actions on the map to navigate to your desired page.

I already do this type of work, and when I click on the map, I use `system.perspective.navigate` as you rightly suggested to open the desired view.

What doesn't happen, of course, is that the tree menu remains at the main items. So, if a user clicks on the map, the correct view will open, but they will have to manually navigate into the submenu tree item `Asia`.

I would like to automate this step via script because I find it absurd to create a quick way to open a facility if, when I go to the navigation tree menu, I find myself one step behind.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 21, 2025, 8:55pm UTC](https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118/9 "2025-01-21T20:55:16Z")

</div>

> [@Aiasa21](#):
>
> I would like to automate this step via script because I find it absurd to create a quick way to open a facility if, when I go to the navigation tree menu, I find myself one step behind.

There is no native way to expand or collapse the menu items in the Menu Tree. The Java script which is used to do this is not exposed.

Probably a good feature request though, if it isn't already one.

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [January 22, 2025, 8:46am UTC](https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118/10 "2025-01-22T08:46:25Z")

</div>

I understand, the Java script is something I can find some manuals or examples? Because actually I don't know what exactly to search for.

Thank you

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 22, 2025, 12:44pm UTC](https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118/11 "2025-01-22T12:44:02Z")

</div>

> [@Aiasa21](#):
>
> Java script is something I can find some manuals or examples

No. Java script itself you can find references to, and you might be able to dig around in the developer tools and find what they're doing, but without a third party module, you can not modify or add to the java script that is produced by the designer.

What you are trying to accomplish comes with a large amount of technical debt.

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [January 22, 2025, 12:55pm UTC](https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118/12 "2025-01-22T12:55:19Z")

</div>

I understand, thanks for your time.

I'll wait for some future update, I guess this feature could be appreciate from all of us.

---

<div class="post-metadata">

**Author:** ![Matej\_Medvecky](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej\_Medvecky](https://forum.inductiveautomation.com/u/Matej_Medvecky)\
**Post date:** [May 14, 2026, 8:43pm UTC](https://forum.inductiveautomation.com/t/menu-tree-change-actual-navigation-view/101118/13 "2026-05-14T20:43:26Z")

</div>

This is still valid request in '26 and would be very much appreciated 🙂
