Skip to content

Commit 40f04a3

Browse files
committed
Added documentation about displaying an icon and example
1 parent bf9a37a commit 40f04a3

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

16/umbraco-cms/customizing/back-office-signs.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ For example, a Document scheduled for future publishing will have a Flag defined
2323
A Flag can be the determinant for a Sign by declaring the `forEntityFlags` as part of its Manifest.
2424

2525
Example:
26+
2627
```json
2728
...
2829
forEntityFlags: "Umb.ScheduledForPublish",
@@ -33,7 +34,30 @@ Using this binding lets the server determine which signs are present in the resp
3334

3435
## Displaying a Sign
3536

37+
Register an entitySign extension. Bind it to Flags using forEntityFlags. For the icon variant, set kind: 'icon' and provide meta.iconName and meta.label so the UI has something to render.
38+
39+
Example:
40+
41+
```typescript
42+
import type { UmbExtensionManifest } from "@umbraco-cms/backoffice/extension-registry";
43+
import { UMB_DOCUMENT_ENTITY_TYPE } from "@umbraco-cms/backoffice/document";
44+
45+
export const manifests: UmbExtensionManifest = {
46+
type: "entitySign",
47+
kind: "icon",
48+
alias: "Umb.EntitySign.Document.IsProtected",
49+
name: "Is Protected Document Entity Sign",
50+
forEntityTypes: [UMB_DOCUMENT_ENTITY_TYPE], // Where it can appear
51+
forEntityFlags: ["Umb.IsProtected"], // <---Binding part-When it should appear
52+
meta: {
53+
iconName: "icon-lock", // Built-in or custom icon name
54+
label: "Protected", // Visible/accessible label
55+
},
56+
};
57+
```
58+
59+
When an entity includes the Umb.IsProtected flag, this Sign appears next to it in the UI.
60+
3661
{% hint style="info" %}
3762
The client extension for backoffice signs will be available in Umbraco 16.4 / 17.0.
3863
{% endhint %}
39-

0 commit comments

Comments
 (0)