> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Migrate a Dashboard Page Extension

## Article: Migrate a Dashboard Page Extension

## Article Link: https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-the-cli/migrate-an-app-from-legacy-cli/migrate-a-dashboard-page-extension.md

## Article Content:

# Migrate a Dashboard Page Extension

This guide explains how to add a dashboard page extension to your new Wix CLI project as part of [migrating an app from the legacy Wix CLI](https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-the-cli/about-the-wix-cli.md).

## Folder structure

| Legacy | New |
|--------|-----|
| `src/dashboard/pages/<name>/page.json` | `src/extensions/dashboard/pages/<name>/<name>.extension.ts` |
| `src/dashboard/pages/<name>/page.tsx` | `src/extensions/dashboard/pages/<name>/<name>.tsx` |

## Step 1 | Move and rename files

To move existing files into the new project:

1. In the new project, create the folder `src/extensions/dashboard/pages/<name>/`.
2. Copy `page.tsx` from the legacy project's `src/dashboard/pages/<name>/` folder into the new project's `src/extensions/dashboard/pages/<name>/` folder, and rename it to `<name>.tsx`.
3. Fix any import paths in the `.tsx` file if needed, including imports of backend code.

Don't copy the old `page.json` file. It is replaced by a new `.extension.ts` file.

## Step 2 | Create the extension file

In `src/extensions/dashboard/pages/<name>/`, create `<name>.extension.ts`:

```ts
import { extensions } from '@wix/astro/builders';

export default extensions.dashboardPage({
  id: '<id-from-page.json>',
  title: '<title-from-page.json>',
  routePath: '<slugified-title>',
  component: './extensions/dashboard/pages/<name>/<name>.tsx',
});
```

| Field | Source | Required |
|-------|--------|----------|
| `id` | `id` from `page.json` | Yes. Must match legacy value to preserve the extension. |
| `title` | `title` from `page.json` | Yes |
| `routePath` | Slugified version of the title, for example `"About"` → `"about"` | Yes |
| `component` | Path to the `.tsx` file, relative to `src/` | Yes |

<blockquote class="important">

__Important:__
The `id` must match the value from the legacy `page.json`. Otherwise, the new entry is treated as a separate extension instead of a continuation of the legacy one.

</blockquote>

## Step 3 | Register the extension

In the new project, in `src/extensions.ts`, import the extension and add it with `.use()`:

```ts
import { app } from '@wix/astro/builders';
import myDashboardPage from './extensions/dashboard/pages/<name>/<name>.extension';

export default app().use(myDashboardPage);
```

## Step 4 | Return to the main migration guide

Return to the [Test, build, and release](https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-the-cli/about-the-wix-cli.md#test-build-and-release) step in the main migration guide.