Skip to content

Commit 82ca300

Browse files
authored
Merge pull request #6677 from nielslyngsoe/v15/correct-package-manifest
V15: correct package manifest
2 parents 1d0932f + 433532f commit 82ca300

File tree

3 files changed

+32
-31
lines changed

3 files changed

+32
-31
lines changed

15/umbraco-cms/customizing/extending-overview/extension-registry/extension-manifest.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,30 @@ description: Learn about the different methods for declaring an Extension Manife
44

55
# Extension Manifest
66

7-
{% hint style="warning" %}
8-
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.
9-
{% endhint %}
7+
# Extension Manifest
108

119
The Extension Manifest is the point of entry for any extension. This is the declaration of what you want to register.
1210

13-
The content in this section describes all the extension types that the Backoffice supports. Here is a list of the most common types:
11+
The content in this section describes all the extension types that the Backoffice supports. Find a list of the most common types in the [Extension Types](../extension-types/) article.
12+
13+
## Extension Manifest Format
14+
15+
An Extension Manifest can be written either as a JavaScript Object or a JSON Object.
1416

15-
{% content-ref url="../../../tutorials/creating-a-custom-dashboard/" %}
16-
[creating-a-custom-dashboard](../../../tutorials/creating-a-custom-dashboard/)
17-
{% endcontent-ref %}
17+
There are a few general properties, the required set of properties consists of the `type`, `alias`, and `name`.
1818

19-
{% content-ref url="../../property-editors/composition/" %}
20-
[composition](../../property-editors/composition/)
21-
{% endcontent-ref %}
19+
```typescript
20+
const manifest = {
21+
type: '...',
22+
alias: 'my.customization',
23+
name: 'My customization'
24+
...
25+
};
26+
```
2227

23-
{% content-ref url="../../../customize-the-backoffice/section-trees.md" %}
24-
[section-trees.md](../../../customize-the-backoffice/section-trees.md)
25-
{% endcontent-ref %}
28+
The `type` defines what it is declaring
29+
The `alias` is a unique identifier for this manifest. It must be globally unique, so make sure to prefix it with something that makes your extension unique.
30+
The `name` is a representational name of this manifest, this does not need to be unique but such can be beneficial when debugging extensions.
2631

2732
## Manifest Data
2833

@@ -36,13 +41,13 @@ The required fields of any extension manifest are:
3641
* `alias`- The alias is used to identify the extension. This has to be unique for each extension.
3742
* `name` - The name of the extension. This is used to identify the extension in the UI.
3843

39-
Additionally, many extensions supports the use of the following fields:
44+
Additionally, many extensions support the use of the following fields:
4045

4146
* `weight` - Define a weight, to determine the importance or visual order of this extension.
42-
* `conditions` - Define one or more conditions which must be permitted for the extension to become available. [Extension Conditions](../extension-conditions/extension-conditions.md).
47+
* `conditions` - Define one or more conditions that must be permitted for the extension to become available. [Extension Conditions](../extension-conditions/extension-conditions.md).
4348
* `kind` - Define a kind-alias of which this manifest should be based upon. Kinds acts like a preset for your manifest. [Extension Kinds](../extension-kind/extension-kind.md).
4449

45-
Many of the Extension Types requires additional information declared as part of a `meta` field.
50+
Many of the Extension Types require additional information declared as part of a `meta` field.
4651

4752
## Registration
4853

15/umbraco-cms/customizing/extending-overview/extension-registry/extension-registry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This page is a work in progress and may undergo further revisions, updates, or a
66

77
The extension registry is the center piece of the Backoffice UI. It holds information about most of the Backoffice UI, as most are extensions. This includes the built-in UI. The registry can be manipulated at any time, meaning you can add or remove extensions at runtime.
88

9-
To provide new UI to the backoffice, you must register them via an extension manifest. This has to be initiated via an Umbraco Package JSON file on the server. This will be your starting point, which enables you to register one or more extensions.
9+
To provide new UI to the backoffice, you must register them via an Extension Manifest. This can be initiated via an Umbraco Package JSON file on the server. This will be your starting point.
1010

1111
Declaring a new extension is done by declaring an [extension manifest](extension-manifest.md). This can be done in one of two ways:
1212

15/umbraco-cms/customizing/umbraco-package.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
description: An extension begins with a Package Manifest
2+
description: An extension begins with a Umbraco Package
33
---
44

55
# Umbraco Package
66

7-
A Package is declared via an Umbraco Package Manifest. This describes the Package and declares one or more UI Extensions. The Package Manifest is a JSON file that is stored in the `App_Plugins/{YourPackageName}` folder. The file is named `umbraco-package.json`.
7+
A Package is declared via an Umbraco Package JSON file. This describes the Package and declares one or more UI Extensions. The Package declaration is a JSON file that is stored in the `App_Plugins/{YourPackageName}` folder. The file is named `umbraco-package.json`.
88

9-
## Sample Manifest
9+
## Sample
1010

11-
This is a sample manifest. It is always stored in a folder in `App_Plugins/{YourPackageName}`, with the name `umbraco-package.json`. In this example, the package name is `SirTrevor` and is a text box property Data Type.
11+
Here is a sample package. It should be stored in a folder in `App_Plugins/{YourPackageName}`, with the name `umbraco-package.json`. In this example, the package name is `SirTrevor` and is a text box property Data Type.
1212

1313
{% hint style="info" %}
14-
Before Umbraco 14, the manifest was declared in a `package.manifest` file instead of `umbraco-package.json`. The old format is no longer supported, but you can migrate the contents to the new format.
14+
Before Umbraco 14, a package was declared in a `package.manifest` file instead of `umbraco-package.json`. The old format is no longer supported, but you can migrate the contents to the new format.
1515
{% endhint %}
1616

1717
{% code title="umbraco-package.json" lineNumbers="true" %}
@@ -41,7 +41,7 @@ Before Umbraco 14, the manifest was declared in a `package.manifest` file instea
4141

4242
## Root fields
4343

44-
The `umbraco-package` accept these fields:
44+
The `umbraco-package` accepts these fields:
4545

4646
```json
4747
{
@@ -78,13 +78,13 @@ The version of your package, if this is not specified there will be no version-s
7878

7979
With this field, you can control the telemetry of this package, this will provide Umbraco with the knowledge of how many installations use this package.
8080

81-
Default is `false`.
81+
The default is `false`.
8282

8383
### Allow Public Access
8484

8585
This field is used to allow public access to the package. If set to `true`, the package will be available for anonymous usage, for example on the login screen. If set to `false`, the package will only be available to logged-in users.
8686

87-
Default is `false`.
87+
The default is `false`.
8888

8989
### Importmap
9090

@@ -120,13 +120,9 @@ Umbraco supports the current specification of the property as outlined on MDN We
120120

121121
### Extensions
122122

123-
The `extensions` field is an array of UI Extension objects. Each object describes a single UI Extension.
123+
The `extensions` field is an array of Extension Manifest objects. Each object describes a single client extension.
124124

125-
There are three generic fields that are common to all UI Extensions:
126-
127-
* `type` - The type of the UI Extension.
128-
* `alias` - The alias of the UI Extension. This must be unique.
129-
* `name` - The name of the UI Extension.
125+
Read more about these in the [Extension Manifests article](./extending-overview/extension-registry/extension-manifest.md).
130126

131127
These are the current types of UI Extensions:
132128

0 commit comments

Comments
 (0)