How to Open Router Pages in New Window from Menu or Button?

I’m working on a site with custom router pages and need to open a specific router page in a new browser window when clicking a menu item or button.

What I’ve tried:

  1. Using location.to() - this only navigates in the same window

  2. Using openModal() - this opens as an overlay, not a new browser window

  3. Setting link target in the Editor - there’s no option for “open in new tab” for router pages

My Question: Is there any way to programmatically open a router page in a new browser window using Wix SDK, Velo, or any other method?

My Setup:

  • Using Wix SDK APIs (@wix/site-location, @wix/site-window)

  • Custom router setup

  • Need this to work from a button/menu item click

If this isn’t possible with Wix’s current functionality, is there a recommended workaround or alternative approach?

Thanks in advance for any help!

If you’re doing this from a button, you can set the buttons target - https://dev.wix.com/docs/velo/velo-only-apis/$w/button/target - which will allow you to open in a new tab.

So:

$w("#myElement").target = "_blank";
$w("#myElement").link = "/router-relative-url";
1 Like