Go Headless

Changelog

Build Apps
Get Started
Overview
Quick Start
Templates
Tutorials
Get an Idea

Develop Your App
About Developing Apps
App Dashboard
Frameworks
About Development Frameworks
Choose the Right Wix Framework for Your App Development Needs
Wix Blocks
Self-hosting
Wix CLI
About the Wix CLI
Get started
Project development
Supported extensions
About Extensions in the Wix CLI
About the extensions.ts File
Dashboard
About Dashboard Extensions in the Wix CLI
Dashboard page
Add Dashboard Page Extensions with the Wix CLI
Dashboard Page Extension Files and Code
Navigate Between Dashboard Pages
Dashboard modals
Dashboard plugins
Dashboard menu plugin
Site
Backend
Extensions
Wix Business Solutions
API Integrations
Access
Design
Wix MCP

Launch Your App
About Launching Apps
Pricing and Billing
Market Listing
Localization
Legal and Security
App Distribution
App Promotion

Manage Your App
User Support
Versioning
Data and Analytics
Contact Us
In This Article

  1. Prerequisites
  2. Step 1 | Get the target page's component ID
  3. Step 2 | Navigate from the source page
  4. Step 3 | Retrieve data on the target page
  5. See also

Navigate Between Dashboard Pages

You can connect multiple dashboard pages in your CLI project using the Dashboard SDK's navigate() and observeState() methods. A common use case is the master-detail pattern: a list page that displays items and a detail page that shows information about a selected item.

To navigate between dashboard pages:

  1. Get the target page's component ID.
  2. Navigate from the source page.
  3. Retrieve data on the target page.

Prerequisites

  • A Wix CLI project with at least 2 dashboard page extensions.
  • The @wix/dashboard package installed in your project.

Step 1 | Get the target page's component ID

Find the target dashboard page's component ID in its extension.ts file. This is the id field:

Copy

Step 2 | Navigate from the source page

On the source page, use dashboard.navigate() to send the user to the target page. Pass data through the relativeUrl parameter:

Copy

Step 3 | Retrieve data on the target page

On the target page, use dashboard.observeState() to read the data passed through the URL. The callback fires when the page initializes and whenever the state updates.

The first parameter (pageParams) contains a location object with the pathname passed via relativeUrl:

Copy

Use the retrieved ID to fetch and display the item's data from your data source.

See also

  • Add Dashboard Page Extensions with the Wix CLI
  • Dashboard Page Extension Files and Code
  • navigate() API reference
  • observeState() API reference
Did this help?