Open a Dashboard Page in Blocks Using Code

Use code to navigate to a dashboard page from a custom panel or from another dashboard page in your app.

First, copy the dashboard URL (for panels) or ID (for other dashboards). Then, use it in your panel or dashboard code.

Note: Panel buttons can also open a dashboard page with no code.

Copy the Dashboard URL or ID:

  1. Go to the app dashboard app dashboard menu.
  2. Hover over the dashboard page's name and click the More Actions icon.
  3. Click Dashboard Page Settings.
  4. Copy the following:
    • For dashboard, copy the Page ID
    • For panel, copy the Page URL

In Dashboards: Use the Dashboard ID

  1. Go to the code section of the dashboard page.
  2. Import the dashboard SDK (remember to install the corresponding npm package).
  3. Call the navigate() function with the dashboard ID. For example:
Copy
See deprecated wix-dashboard example
Copy

In Panels: Use the Dashboard URL

Opening a dashboard from a custom panel is slightly different:

  1. Open your panel from the Editor Experience > Panels tab.
  2. Go to your panel's code section.
  3. Import the wix-editor module.
  4. Use the openDashboardPanel() function with the correct URL. For example:
Copy
Did this help?