> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - 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: Dashboard Sidebar Category Extension Files and Code

## Article: Dashboard Sidebar Category Extension Files and Code

## Article Link: https://dev.wix.com/docs/dashboard-extensions/dashboard-sidebar-categories/dashboard-sidebar-category-extension-files-and-code.md

## Article Content:

# Dashboard Sidebar Category Extension Files and Code

When you add a [dashboard sidebar category](https://dev.wix.com/docs/overview/extensions-framework/dashboard-extensions/dashboard-sidebar-categories.md) extension, the generated file lands under `src/extensions/dashboard/sidebar-categories/<category-folder>/` and the extension is registered in your project's `extensions.ts`.

This file is the same in a Wix CLI app and in a Wix-managed headless project.

```text
src/
└── extensions/
    └── dashboard/
        └── sidebar-categories/
            └── <category-folder>/
                └── <category-folder>.extension.ts
```

| File | What it's for |
|------|---------------|
| `<category-folder>.extension.ts` | The [configuration file](#configuration-file) for the sidebar category ID, title, and priority. It also exports the category ID for dashboard pages to import. |

A sidebar category has no component file. Dashboard pages link to it through their own configuration. See [Pages in a sidebar category](#pages-in-a-sidebar-category).

## Configuration file

The `<category-folder>.extension.ts` file declares the sidebar category with `extensions.dashboardSidebarCategory()` and exports the category ID as `APP_SIDEBAR_CATEGORY_ID`.

Import `extensions` from the package your project uses:

```ts
// Wix CLI app
import { extensions } from '@wix/custom-extensions';
```

```ts
// Wix-managed headless project
import { extensions } from '@wix/astro/builders';
```

```ts
export default extensions.dashboardSidebarCategory({
  id: string,
  title: string,
  priority?: number,
});
```

Example:

```ts
export const APP_SIDEBAR_CATEGORY_ID = '5ddfb589-d19d-41b4-b496-00ccd2bd830f';

export default extensions.dashboardSidebarCategory({
  id: APP_SIDEBAR_CATEGORY_ID,
  title: 'Inventory Tools',
});
```

### Configuration fields

| Field | Type | Description |
|--|--|--|
| `id` | string | Sidebar category ID as a GUID. The generated file sets it to `APP_SIDEBAR_CATEGORY_ID`, which dashboard pages import to link to the category. |
| `title` | string | The label of the category in the dashboard sidebar. The generated file uses the title you enter when you generate the extension. |
| `priority` | number | Optional. Order of the category in the dashboard sidebar. The app's sidebar categories and its pages that aren't in a category are ordered together. Smaller numbers appear higher. Default: `0`. |

## Pages in a sidebar category

A dashboard page is in a sidebar category when its configuration sets `pageCategoryId` to the category's `id`. The file that the CLI generates for a dashboard page doesn't set `pageCategoryId`.

The following example shows a page's `.extension.ts` file that imports `APP_SIDEBAR_CATEGORY_ID` from the category's file and sets `pageCategoryId`:

```ts
import { APP_SIDEBAR_CATEGORY_ID } from '../../sidebar-categories/inventory-tools/inventory-tools.extension.ts';

export default extensions.dashboardPage({
  id: 'c7a1e0f2-3b4d-4e5f-8a9b-0c1d2e3f4a5b',
  title: 'Stock Levels',
  routePath: 'stock-levels',
  component: './extensions/dashboard/pages/stock-levels/stock-levels.tsx',
  priority: 1,
  pageCategoryId: APP_SIDEBAR_CATEGORY_ID,
});
```

The pages in a sidebar category are ordered by their own `priority`. If a page's `pageCategoryId` doesn't match a sidebar category, the page doesn't appear in the dashboard sidebar. In a Wix-managed headless project, it appears under **Custom Pages** instead. For the other page fields, see [Dashboard Page Extension Files and Code](https://dev.wix.com/docs/dashboard-extensions/dashboard-pages/dashboard-page-extension-files-and-code.md).

## See also

- [About Dashboard Sidebar Categories](https://dev.wix.com/docs/dashboard-extensions/dashboard-sidebar-categories/about-dashboard-sidebar-categories.md)
- [Dashboard Sidebar Categories](https://dev.wix.com/docs/overview/extensions-framework/dashboard-extensions/dashboard-sidebar-categories.md)
- [Dashboard Page Extension Files and Code](https://dev.wix.com/docs/dashboard-extensions/dashboard-pages/dashboard-page-extension-files-and-code.md)