> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/umbraco-cms/extend-your-project/backoffice-extensions/extending-overview/extension-types/tree/trees-and-workspaces.md).

# Trees & Workspaces

Trees and Workspaces are tightly coupled. When users click a Tree Item, Umbraco navigates to a Workspace to edit that item. This connection is established through the `entityType`, a string identifier that links Tree Items to their corresponding Workspace.

## How Tree Items Connect to Workspaces

When you click a Tree Item:

1. Umbraco reads the `entityType` from the Tree Item data.
2. It navigates to the edit Workspace URL, passing the items `unique` identifier.

## Workspace Kind: Routable vs Default

To support different routes for new and existing items, your Workspace must be routable to have different routes for each case. Use `kind: 'routable'` and set up matching routes in your Workspace API:

```typescript
// Tree Item Manifest
{
    type: 'treeItem',
    kind: 'default',
    alias: 'My.TreeItem',
    forEntityTypes: ['my-custom-item'],
}

// Workspace Manifest - MUST be routable for Tree navigation
{
    type: 'workspace',
    kind: 'routable',
    alias: 'My.Workspace',
    name: 'My Custom Item Workspace',
    api: () => import('./my-custom-item-workspace.api.js'),
    meta: {
        entityType: 'my-custom-item',  // Must match Tree Item entityType
    },
}
```

## Common Issues

{% hint style="warning" %}
**Endless loading when clicking Tree Items?** This usually means:

* No Workspace is registered for that `entityType`.
* The `entityType` in your Tree data doesn't match the Workspace's `meta.entityType`.
*

{% endhint %}

## Related

* [Trees](/umbraco-cms/extend-your-project/backoffice-extensions/extending-overview/extension-types/tree.md) - Main Tree extension documentation.
* [Workspaces](/umbraco-cms/extend-your-project/backoffice-extensions/extending-overview/extension-types/workspaces.md) - Creating Workspace extensions.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.umbraco.com/umbraco-cms/extend-your-project/backoffice-extensions/extending-overview/extension-types/tree/trees-and-workspaces.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
