You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: adds a description to the article
* docs: renames article and removes a duplicated paragraph
* docs: adds more info on backoffice entry points and corrects many mistakes
* docs: adds info about app entry points
* docs: fix typo in reference to backofficeEntryPoint
* docs: adds reference from backoffice entry point to bundle
* docs: correct content-ref links
Copy file name to clipboardExpand all lines: 15/umbraco-cms/customizing/extending-overview/extension-registry/extension-manifest.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,22 +80,26 @@ Read more about the `backofficeEntryPoint` extension type in the [Entry Point](e
80
80
81
81
Similar as `appEntryPoint` this runs as startup, the difference is that this runs before the user is logged in. Use this to initiate things before the user is logged in or to provide things for the Login screen.
82
82
83
+
Read more about the `appEntryPoint` extension type in the [App Entry Point](../extension-types/app-entry-point.md) article.
84
+
83
85
## Type intellisense
84
86
85
87
It is recommend to make use of the Type intellisense that we provide.
86
88
87
89
When writing your Manifest in TypeScript you should use the Type `UmbExtensionManifest`, see the [TypeScript setup](../../development-flow/typescript-setup.md) article to make sure you have Types correctly configured.
The `Entry Point` type is used to execute the method of a JavaScript file when the backoffice is initialized. This file can be used to do anything, this enables more complex logic to take place on startup.
23
+
The `backofficeEntryPoint` type is used to execute the method of a JavaScript file when the backoffice is initialized. This file can be used to do anything, this enables more complex logic to take place on startup.
description: The App Entry Point extension type is used to run some JavaScript code before the user is logged in.
3
+
---
4
+
5
+
# App Entry Point
6
+
7
+
This manifest declares a single JavaScript file that will be loaded and run when the Backoffice starts. Additionally, the code will also run on the login screen.
8
+
9
+
It performs the same function as the `backofficeEntryPoint` extension type, but the difference is that this runs before the user is logged in. Use this to initiate things before the user is logged in or to provide things for the Login screen.
10
+
11
+
Read more about `backofficeEntryPoint` to learn how to use it:
description: The Backoffice Entry Point extension type is used to run some JavaScript code at startup.
3
+
---
2
4
3
-
{% hint style="warning" %}
4
-
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.
5
-
{% endhint %}
5
+
# Backoffice Entry Point
6
6
7
-
The `backofficeEntryPoint` extension type can be used to run some JavaScript code at startup.\
8
-
The entry point declares a single JavaScript file that will be loaded and run when the Backoffice starts. In other words this can be used as an entry point for a package.
7
+
This manifest declares a single JavaScript file that will be loaded and run when the Backoffice starts. In other words this can be used as an entry point for a package.
9
8
10
9
The `backofficeEntryPoint` extension is also the way to go if you want to load in external libraries such as jQuery, Angular, React, etc. You can use the `backofficeEntryPoint` to load in the external libraries to be shared by all your extensions. Additionally, **global CSS files** can also be used in the `backofficeEntryPoint` extension.
11
10
12
-
The Entry Point manifest type is used to register an entry point for the backoffice. An entry point is a single JavaScript file that is loaded when the backoffice is initialized. This file can be used to do anything, this enables more complex logic to take place on startup.
11
+
{% hint style="info" %}
12
+
See also the [App Entry Point](./app-entry-point.md) article for a similar extension type that runs before the user is logged in.
13
+
{% endhint %}
13
14
14
-
**Register an entry point in the `umbraco-package.json` manifest**
15
+
**Register a Backoffice Entry Point in the `umbraco-package.json` manifest**
15
16
17
+
{% code title="umbraco-package.json" %}
16
18
```json
17
19
{
18
20
"name": "Name of your package",
21
+
"alias": "My.Package",
19
22
"extensions": [
20
23
{
21
24
"type": "backofficeEntryPoint",
@@ -25,23 +28,134 @@ The Entry Point manifest type is used to register an entry point for the backoff
25
28
]
26
29
}
27
30
```
31
+
{% endcode %}
32
+
33
+
**Base structure of the entry point file**
28
34
29
-
**Register additional UI extensions in the entry point file**
35
+
{% hint style="info" %}
36
+
All examples are in TypeScript, but you can use JavaScript as well. Make sure to use a bundler such as [Vite](../../development-flow/vite-package-setup.md) to compile your TypeScript to JavaScript.
If you only need to register extensions, then consider using a [bundle](./bundle.md) type instead.
95
+
{% endhint %}
96
+
97
+
### Register global CSS
98
+
99
+
An entry point is a good place to load global CSS files for the whole application. You can do this by creating a link element and appending it to the head of the document:
Alternatively, you can import the CSS file directly in your JavaScript file:
115
+
116
+
{% code title="index.ts" %}
117
+
```typescript
118
+
import'/App_Plugins/YourFolder/global.css';
119
+
```
120
+
{% endcode %}
121
+
122
+
## Type IntelliSense
123
+
124
+
It is recommended to make use of the Type intellisense that we provide.
125
+
126
+
When writing your Manifest in TypeScript you should use the Type `UmbExtensionManifest`, see the [TypeScript setup](../../development-flow/typescript-setup.md) article to make sure you have Types correctly configured.
| authProvider | An authentication provider for [external login](../reference/security/external-login-providers.md). |
133
-
| appEntryPoint | An app entry point is a JavaScript module that is executed when any app is loaded (Login, Installer, Upgrader, and Backoffice). It will never be destroyed. Read more about [Entry Points](extending-overview/extension-types/backoffice-entry-point.md). |
133
+
| appEntryPoint | An app entry point is a JavaScript module that is executed when any app is loaded (Login, Installer, Upgrader, and Backoffice). It will never be destroyed. Read more about [Entry Points](extending-overview/extension-types/app-entry-point.md). |
134
134
| backofficeEntryPoint | A backoffice entry point is a JavaScript module that is executed when the backoffice is loaded. It will be destroyed when the backoffice is closed or logged out. Read more about [Entry Points](extending-overview/extension-types/backoffice-entry-point.md). |
135
135
| blockEditorCustomView | A custom view for a block in the block editor. |
136
136
| bundle | A bundle is a collection of other manifests that can be loaded together. You would use this in lieu of a `backofficeEntryPoint` if all you needed was to load extensions through JavaScript. |
0 commit comments