[FEATURE] Project swap in MenuTree

I am currently using the b2019021902 build.
I would like to have some tips on how doing a swap between projects, using a “Menu Tree” component.
I know that the “target” property of the tree can be set, for example, equal to “/myPageUrl/:paramX”, that points to a specific view inside the current project.

How can I do if I want to use the “target” property to redirect to another project (on the same gateway instance)? Is it feasible?

Thank you for your suggestions.

Correct me if I’m wrong, but can’t you specify a URL of any type?
The ‘/’ beginning is just a shortcut to the items in your current project.

[from https://docs.inductiveautomation.com/display/DOC80/Perspective+-+Menu+Tree]

A url (external), or mounted path to a page. If “items” is empty (no subtree to this item), this will navigate to that location.

Entering Page paths without the leading “/” will open pages in a new tab.

value: string

[I’m working on restoring a broken project (which I’ll talk about later), otherwise I would post with more certainty.]

Hi Joe,
thanks for your reply.
I am working on a very similar approach: I am able to change the url path, but the resources of the target project are not loaded in a consistent way.
I am curious to know from IA developers which the best way to proceed.
Thank you again for your kind answer.

I post the following picture, to be clearer:

I moved from the project called “wTechno” to another one called “wContainer”: the new url is correct, but, as you can see from the tab title, the resources are still the “wTechno” ones.

As far as I know you can’t switch to a different project by specifying the project and its resources as a target, whether you’re using the Menu Tree, Link, or even a perspective.navigate() script because your current project has no concept of other projects ortheir resources, and all “referencing” is done with the expectation that the source of any paths is your current project’s name.

From one of my projects “Base” I tried to supply a resource path of “/…/Reference”, where “Reference” is the name of another project on my Gateway. While this DID resolve correctly in the url bar, it did not load the content from the Reference project, and this could entirely be by design; suppose I had authenticated for the Base project, but then triggered a navigation to a project for which I have not authenticated…

You ARE able to supply the full URL of the project you want to open (“http://<gateway_ip>:<gateway_port>/data/perspective/client/<project_name>”) as a target and this will open the secondary project in a new browser tab.

For future design purposes though, if content is related between two projects, it should either really only be one project, or the shared content should be in your “parent” project - that is, the project from which the two projects which share content inherit from.

1 Like

2 posts were split to a new topic: [Feature-12840] system.util.getGatewayAddress Should Be Scoped For Perspective