bellissima available contexts
# help-with-umbraco
m
What's the best way to know the contexts available on Bellissima? I cant find any docs about it. I'd like to rebuild my package Conditional Displayers and I need access to the available properties in the document being edited. Any guidelines on how to access those? I'm guessing I can access them using some context that exposes them.
l
If you try adding the
<umb-debug visible>
component to your property-editor, it'll give you an overview of which contexts are available to your component. https://apidocs.umbraco.com/v14/ui/?path=/docs/guides-debug--docs One thing to note is that property-editors may be used elsewhere in the CMS (outside of documents, media), e.g. custom sections, UI Builder (once it's developed), so some context may not be available in those scenarios.
m
Oh nice, thanks, I'll give it a try.
I can't find any context that exposes a list of all the properties. Any ideas?
l
Could try the
UMB_WORKSPACE_CONTEXT
(which for documents would give you
UmbDocumentWorkspaceContext
), then use
getData()
to get the full data object of the workspace, I think the property data is inside
.values
. https://github.com/umbraco/Umbraco.CMS.Backoffice/blob/v14.1.0-rc1/src/packages/documents/documents/workspace/document-workspace.context.ts#L295 There is also a
.structure
observable on the workspace context too, which gives the doctype object, so that might be a good solution too.
13 Views