jacob
(Jacob Overgaard 🚀)
March 24, 2025, 2:05pm
2
Shameless plug, but I think this other issue with Where is the Backoffice UI Documentation? covers your use case as well, where I posted an example:
Unfortunately, it is not well documented. You would have to figure it out through the source code, but this might get you going:
Consume the UMB_PROPERTY_DATASET_CONTEXT, a context class that holds the values of the current entity, so it would work inside property editors, workspace views, and so on:
import { UMB_PROPERTY_DATASET_CONTEXT } from '@umbraco-cms/backoffice/property';
const context = await this.getContext(UMB_PROPERTY_DATASET_CONTEXT);
const allProperties = context?.properties ??…
That will get you the properties on the page, but if you instead want a more generic alias, you could try and consume the UMB_DOCUMENT_WORKSPACE_CONTEXT
which has a property for contentTypeUnique
that is a GUID of your content type.
1 Like