Worked on content type condition
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { ManifestWorkspaceView } from '@umbraco-cms/backoffice/extension-registry';
|
||||
|
||||
const workspace: ManifestWorkspaceView = {
|
||||
type: 'workspaceView',
|
||||
alias: 'Example.WorkspaceView.EntityContentTypeCondition',
|
||||
name: "Example Workspace View With Entity Content Type Condition",
|
||||
element : () => import('./workspace-view.element.js'),
|
||||
meta: {
|
||||
icon : 'icon-bus',
|
||||
label : 'Conditional',
|
||||
pathname : 'conditional'
|
||||
},
|
||||
conditions : [
|
||||
{
|
||||
alias : 'Umb.Condition.EntityContentType',
|
||||
oneOf : ['29643452-cff9-47f2-98cd-7de4b6807681','media-type-1-id']
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export const manifests = [
|
||||
workspace
|
||||
]
|
||||
@@ -0,0 +1,20 @@
|
||||
import { css, html } from 'lit';
|
||||
import { customElement } from 'lit/decorators.js';
|
||||
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
||||
|
||||
@customElement('umb-example-entity-content-type-condition')
|
||||
export class UmbWorkspaceViewElement extends UmbLitElement {
|
||||
render() {
|
||||
return html`<p>This is a conditional element that is only shown in workspaces based on it's entities content type.</p>`;
|
||||
}
|
||||
|
||||
static styles = [css``];
|
||||
}
|
||||
|
||||
export default UmbWorkspaceViewElement
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'umb-example-entity-content-type-condition': UmbWorkspaceViewElement;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user