Trying to make a nav menu

I’m currently trying to make a menu in my apps, but I really don’t understand how to make the change between the home page and the maps pages. Do I need to create a new window? How does it works?

Thank you!

Hi @Zefix,

Developing an OW app is very similar to a Single-page application development that is written in JavaScript-based technologies.

Depends on your preferred technology, you can build OW apps using many options: web components that are using tabs, create a few OW app’s windows, and more.

Also, you can use different technologies like react, angular, View.

So, as you can see, it’s tough to answer your question… without additional info, code examples, wireframes, explanation on the expected behavior, etc.

ok here is a example of what I just did in my desktop.html


but when I click on maps when the apps is launch it closed the app and I don’t know why.

Is there any example that could help me with toggle new window in nav?

Do I need to initilize all my window when the app is running and minimize them? Then when I want to use them, I just need to use the method restore() and obtaindeclaredwindow()?

that’s my manifest right now:

but I don’t know what I should do next?

It’s up to you if you want to open another window and or minimize the existing window and open a new one instead.

How to create a new window

Call obtainDeclaredWindow()

First, you must call using the window’s name as declared in your manifest.json. This will create a single instance of your window and return basic window information including id, name, width, height and other base properties.

Call restore()

Afterwards, you need to call using either the window’s name or id retrieved from obtainDeclaredWindow.

I just did that and I didn’t like it… Someone on the discord sever told me that I can’t to a href link, what are my possibilities then? I juste want a navigation menu that switch between pages without calling a new windows

If you want a example of what I’m trying to do check porofessor nav.

Does it call a new windows? How does his nav work?

@Zefix in professor, the main window with the tabs is one window. The content inside is replaced when you click on the tabs.

I’m not sure how exactly this specific app implements it, but there are tons of ways to implement tabs in a web page, like iframes, view, react, and different technologies that offer UI components and concepts. It’s has nothing related to overwolf.

Unfortunately, these issues are behind the scope, as it’s a non-overwolf topic. It’s essential web development.

I recommend you first build a simple OW app that not using events. Just a window with tabs and switchable content. that will be a good start :slight_smile: