# Extending Tree Menu Event Object

**URL:** <https://forum.inductiveautomation.com/t/extending-tree-menu-event-object/87103>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting\
**Created:** [March 11, 2024, 2:31am UTC](https://forum.inductiveautomation.com/t/extending-tree-menu-event-object/87103 "2024-03-11T02:31:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![n099y](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@n099y](https://forum.inductiveautomation.com/u/n099y)\
**Post date:** [March 11, 2024, 2:31am UTC](https://forum.inductiveautomation.com/t/extending-tree-menu-event-object/87103/1 "2024-03-11T02:31:41Z")

</div>

Is there a way to extend the functionality of the Menu Tree Component in perspective so I can access some other parts of the items tree ? I want to have a label which would be the page i am navigating to and another item that would be the directory that page is inside or something like that.

I would use target but it seems to open i a new page each time if I put anything in there. If someone has a way to stop that it would help too.

```auto
def runAction(self, event):
	if event.enabled:
		myscript.navigateTo(event.backActionText)

```

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/5/25ddc0dfd272127c0840a80c9aee4963328e4c50.png)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 11, 2024, 3:35pm UTC](https://forum.inductiveautomation.com/t/extending-tree-menu-event-object/87103/2 "2024-03-11T15:35:21Z")

</div>

Could you be a bit more clear in what you're trying to accomplish?

> [@n099y](#):
>
> I would use target but it seems to open i a new page each time if I put anything in there. If someone has a way to stop that it would help too.

I'm reasonably certain that providing a `target` value with no leading slash will open in a new tab. When navigating in Perspective (including via `target` properties in navigation components) you must provide the mounted page path which always begins with a leading slash. Suppose you have a Page Configuration where the mounted path (URL) is `/`, and the View in use is a View named "Home". To navigate to this Page, you would always specify the `/` value. Any supplied value which does not start with a `/` is understood to be a non-Perspective mounted path, and is therefore opened in a separate tab so as to not exit your current tab from your project.
