Skip to content

Commit 581140c

Browse files
committed
Merge branch 'main' into cms/release/15.4
2 parents a00582e + cbd1c02 commit 581140c

File tree

391 files changed

+6353
-3270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

391 files changed

+6353
-3270
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ indent_size = 4
1414

1515
# Trim trailing whitespace, limited support.
1616
# https://github.com/editorconfig/editorconfig/wiki/Property-research:-Trim-trailing-spaces
17-
trim_trailing_whitespace = true
17+
trim_trailing_whitespace = false
1818

1919
[*.{cs,vb}]
2020
dotnet_style_predefined_type_for_locals_parameters_members = true:error

10/umbraco-cms/extending/health-check/guides/fixedapplicationurl.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
---
2-
3-
4-
---
5-
6-
# Health check: Fixed Application URL
7-
8-
_Check to make sure a fixed application URL is specified. This URL is for example used when sending emails from backoffice.
9-
If this is not specified in configuration, Umbraco gets the application URL from last host used to request the application_
1+
# Fixed Application Url
102

3+
_Check to make sure a fixed application URL is specified. This URL is for example used when sending emails from backoffice. If this is not specified in configuration, Umbraco gets the application URL from last host used to request the application_
114

125
## How to fix this health check
136

@@ -45,4 +38,6 @@ One example that can be used in production
4538
}
4639
```
4740

48-
{% hint style="info" %} If the site is hosted on Umbraco Cloud, changing the above configuration will have no effect. The site will always use the URL set in the`umbraco-cloud.json` file, which can not be changed. {% endhint %}
41+
{% hint style="info" %}
42+
If the site is hosted on Umbraco Cloud, changing the above configuration will have no effect. The site will always use the URL set in the\`umbraco-cloud.json\` file, which can not be changed.
43+
{% endhint %}

10/umbraco-cms/extending/property-editors/declaring-your-property-editor.md

Lines changed: 29 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
1-
---
2-
3-
4-
---
5-
61
# Declaring your property editor
72

83
Generally Umbraco supports two different ways to declare a property editor. Most commonly one would create a `package.manifest` file, and then use it for declaring one or more property editors. But as an alternative, property editors can also be declared using C#.
94

105
A property editor consists of a number of mandatory properties, and some optional ones as well. As such, the outer JSON object for the property editor has the following properties:
116

12-
| Name | Type | Required | Description |
13-
| ---- | ---- | ---- | ---- |
14-
| `alias` | string | Yes | A unique alias that identifies the property editor. |
15-
| `name` | string | Yes | The friendly name of the property editor, shown in the Umbraco backoffice. |
16-
| `editor` | object | Yes | This describes details about the editor. See the table below for further information. |
17-
| `icon` | string | No | A CSS class for the icon to be used in the **Select Editor** dialog - eg: `icon-autofill`. |
18-
| `group` | string | No | The group to place this editor in within the **Select Editor** dialog. Use a new group name or alternatively use an existing one such as **Pickers**. |
19-
| `isParameterEditor` | boolean | No | Enables the property editor as a macro parameter editor. Can be either `true` or `false` (default). |
20-
| `defaultConfig` | object | No | Provides a collection of default configuration values, in cases the property editor is not configured or is used a parameter editor (which doesn't allow configuration). The object is a key/value collection and must match the prevalue fields keys. |
7+
| Name | Type | Required | Description |
8+
| ------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
9+
| `alias` | string | Yes | A unique alias that identifies the property editor. |
10+
| `name` | string | Yes | The friendly name of the property editor, shown in the Umbraco backoffice. |
11+
| `editor` | object | Yes | This describes details about the editor. See the table below for further information. |
12+
| `icon` | string | No | A CSS class for the icon to be used in the **Select Editor** dialog - eg: `icon-autofill`. |
13+
| `group` | string | No | The group to place this editor in within the **Select Editor** dialog. Use a new group name or alternatively use an existing one such as **Pickers**. |
14+
| `isParameterEditor` | boolean | No | Enables the property editor as a macro parameter editor. Can be either `true` or `false` (default). |
15+
| `defaultConfig` | object | No | Provides a collection of default configuration values, in cases the property editor is not configured or is used a parameter editor (which doesn't allow configuration). The object is a key/value collection and must match the prevalue fields keys. |
2116

2217
The `editor` object then has the following properties:
2318

24-
| Name | Type | Required | Description |
25-
| ---- | ---- | ---- | ---- |
26-
| `view` | string | Yes | This is the full path to the HTML view for your property editor. |
27-
| `hideLabel` | bool | Yes | If set to `true`, this hides the label for the property editor when used in Umbraco on a Document Type. |
28-
| `valueType` | object | No | This is the type of data you want your property editor to save to Umbraco. Possible values are `STRING`, `JSON`, `DATETIME`, `TEXT` and `INT`. Default is `STRING`. |
29-
| `validation` | object | No | Object describing required validators on the editor. |
30-
| `isReadOnly` | boolean | No | If set to true this makes the property editor read only. |
19+
| Name | Type | Required | Description |
20+
| ------------ | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21+
| `view` | string | Yes | This is the full path to the HTML view for your property editor. |
22+
| `hideLabel` | bool | Yes | If set to `true`, this hides the label for the property editor when used in Umbraco on a Document Type. |
23+
| `valueType` | object | No | This is the type of data you want your property editor to save to Umbraco. Possible values are `STRING`, `JSON`, `DATETIME`, `TEXT` and `INT`. Default is `STRING`. |
24+
| `validation` | object | No | Object describing required validators on the editor. |
25+
| `isReadOnly` | boolean | No | If set to true this makes the property editor read only. |
3126

3227
## Using a Package Manifest
3328

@@ -163,24 +158,23 @@ Also notice how the `PropertyEditorAsset` attribute is used to load the `SirTrev
163158

164159
The [DataEditor](https://apidocs.umbraco.com/v10/csharp/api/Umbraco.Cms.Core.PropertyEditors.DataEditorAttribute.html) attribute shown in the example above is the primary component to declaring the property editor in C#. Notice that the first four properties must be set through the constructor.
165160

166-
| Name | Type | Required | Description |
167-
|----------------| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ |
168-
| `Alias` | string | Yes | Gets the unique alias of the editor. |
161+
| Name | Type | Required | Description |
162+
| -------------- | --------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
163+
| `Alias` | string | Yes | Gets the unique alias of the editor. |
169164
| `EditorType` | [EditorType](https://apidocs.umbraco.com/v10/csharp/api/Umbraco.Cms.Core.PropertyEditors.EditorType.html) | Yes | Gets the type of the editor. Possible values are `EditorType.PropertyValue`, `EditorType.MacroParameter` or `EditorType.Nothing`. |
170-
| `Name` | string | Yes | Gets the friendly name of the editor. |
171-
| `View` | string | Yes | Gets the view to use to render the editor. |
172-
| `ValueType` | string | No | Gets or sets the type of the edited value. |
173-
| `HideLabel` | boolean | No | Gets or sets a value indicating whether the editor should be displayed without its label. |
174-
| `Icon` | string | No | Gets or sets an optional icon. |
175-
| `Group` | string | No | Gets or sets an optional group. |
176-
| `IsDeprecated` | boolean | No | Gets or sets a value indicating whether the value editor is deprecated. |
165+
| `Name` | string | Yes | Gets the friendly name of the editor. |
166+
| `View` | string | Yes | Gets the view to use to render the editor. |
167+
| `ValueType` | string | No | Gets or sets the type of the edited value. |
168+
| `HideLabel` | boolean | No | Gets or sets a value indicating whether the editor should be displayed without its label. |
169+
| `Icon` | string | No | Gets or sets an optional icon. |
170+
| `Group` | string | No | Gets or sets an optional group. |
171+
| `IsDeprecated` | boolean | No | Gets or sets a value indicating whether the value editor is deprecated. |
177172

178173
### PropertyEditorAsset attribute
179174

180175
As shown in the C# example, the [PropertyEditorAsset](https://apidocs.umbraco.com/v10/csharp/api/Umbraco.Cms.Infrastructure.WebAssets.PropertyEditorAssetAttribute.html) attribute was used to make Umbraco load the specified JavaScript file.
181176

182-
The constructor of the attribute takes the type of the assets as the first parameter.
183-
Possible values are either `AssetType.Javascript` or `AssetType.Css`. The second parameter is the URL of the asset.
177+
The constructor of the attribute takes the type of the assets as the first parameter. Possible values are either `AssetType.Javascript` or `AssetType.Css`. The second parameter is the URL of the asset.
184178

185179
### DataEditor class
186180

@@ -294,13 +288,11 @@ A benefit of this approach (opposed to `package.manifest` files) is that we can
294288
}
295289
```
296290

297-
Both instances of `IDataType` and `PublishedDataType` have a `Configuration` property.
298-
When looking across all data types and property editors, there is no common type for the configuration, so the return value is `object`.
299-
To get the strongly typed model, you can either cast the configuration value on your own, or use the generic `ConfigurationAs` extension method as shown above.
291+
Both instances of `IDataType` and `PublishedDataType` have a `Configuration` property. When looking across all data types and property editors, there is no common type for the configuration, so the return value is `object`. To get the strongly typed model, you can either cast the configuration value on your own, or use the generic `ConfigurationAs` extension method as shown above.
300292

301293
Like mentioned before, the `SirTrevorConfigurationEditor` class doesn't really do much in this example with the Sir Trevor property editor. But the **Multi Node Tree Picker** and others of Umbraco's build in property editors also override the `ToValueEditor` method.
302294

303-
This method is used when the strongly typed configuration value is converted to the model used by the Angular logic in the backoffice. So with the implementation of the [MultiNodePickerConfigurationEditor]( https://github.com/umbraco/Umbraco-CMS/blob/ade9bb73246caf25a7073f2b9e5262641a201863/src/Umbraco.Web/PropertyEditors/MultiNodePickerConfigurationEditor.cs) class, some additional configuration fields are sent along. For instance that it's a multi picker and that the ID type should be URI's. These are configuration values that the user should not be able to edit, but the property editor may still rely on them.
295+
This method is used when the strongly typed configuration value is converted to the model used by the Angular logic in the backoffice. So with the implementation of the [MultiNodePickerConfigurationEditor](https://github.com/umbraco/Umbraco-CMS/blob/ade9bb73246caf25a7073f2b9e5262641a201863/src/Umbraco.Web/PropertyEditors/MultiNodePickerConfigurationEditor.cs) class, some additional configuration fields are sent along. For instance that it's a multi picker and that the ID type should be URI's. These are configuration values that the user should not be able to edit, but the property editor may still rely on them.
304296

305297
```csharp
306298
using Umbraco.Cms.Core.IO;

0 commit comments

Comments
 (0)