This page is a work in progress and may undergo further revisions, updates, or amendments. The information contained herein is subject to change without notice.
A Workspace is the editor for a specific entity type. It can either be a simple view of data or a complex editor with multiple views.
A workspace is based on an entity type (e.g. content, media, member, etc.) and a unique string (ex: key).
Most workspaces hold a draft state of an entity. It is a copy of the entity data that can be modified at runtime and sent to the server to be saved.
A workspace can be a single view or consist of multiple views.
A workspace should host a workspace context, with which anything within can communicate.
Append a view to any Workspace
This page is a work in progress and may undergo further revisions, updates, or amendments. The information contained herein is subject to change without notice.
Workspace Views was previously called Content Apps.
Workspace Views are customizable companion tabs with the ability to take place in any workspace.
In Content Section
With Workspace Views, editors can switch from editing 'Content' to accessing contextual information related to the item they are editing.
The default workspace view is 'Info' - displaying Links, History and Status of the current content item.
Follow the Vite Package Setup by creating a new project folder called "workspaceview
" in App_Plugins
.
Create a manifest file named umbraco-package.json
at the root of the welcome-dashboard
folder. Here we define and configure our dashboard.
Add the following code to umbraco-package.json
:
Add the following code to the existing my-element.ts
from the src
folder:
In the workspaceview
folder run npm run build
and then run the project. Then in the content section of the Backoffice you will see our new Workspace View:
To see the Workspace View that we have created in the content section, first you will need to have some content created.
Establish an extension to communicate across the application.
This page is a work in progress and may undergo further revisions, updates, or amendments. The information contained herein is subject to change without notice.
A Workspace context is a container for the data of a workspace. It is a wrapper around the data of the entity that the workspace is working on. It is responsible for loading and saving the data to the server. Workspace Contexts are used to bring additional context alongside the default context of a workspace.
A workspace context knows about its entity type (for example content, media, member, etc.) and holds its unique string (for example: key).
Most workspace contexts hold a draft state of its entity data. It is a copy of the entity data that can be modified at runtime and sent to the server to be saved.
If a workspace wants to utilize Property Editor UIs, then it must provide a variant context for the property editors. The variant-context is the generic interface between workspace and property editors.
The API will be initiated with the same host as the default Workspace Context.
The code of such an API file could look like this:
Context APIs have to be self-providing. To do so it has to be an Umbraco Controller.
A Context Token for a Workspace Context Extension should look like this:
We recommend using UmbWorkspaceContext
as the Context Alias for your Context Token. This will ensure that the requester only retrieves this Context if it's present at their nearest Workspace Context. Use the Extension Manifest Alias as the API Alias for your Context Token. For more information, see the Context API article.
This page is a work in progress and may undergo further revisions, updates, or amendments. The information contained herein is subject to change without notice.
Workspace actions are a set of functionalities or operations that can be performed within a workspace. These actions involve creating documents within the workspace, organizing and categorizing documents, publishing content and so on.
Workspace action relates to a workspace alias (Umb.Workspace.Document) and has Access to the workspace context.
JavaScript Manifest example
As part of the Extension Manifest you can attach a class that will be instantiated as part of the action. It will have access to the host element and the Workspace Context. When the action is clicked the execute
method on the API class will be run. When the action is completed, an event on the host element will be dispatched to notify any surrounding elements.
Default Element