Skip to content

Commit 0ad2685

Browse files
Add note about providing custom grid editor configuration
1 parent f0e6620 commit 0ad2685

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

13/umbraco-deploy/deployment-workflow/import-with-migrations.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Open source migrators may be built by HQ or the community for property editors f
123123

124124
#### Grid to Block Grid
125125

126-
The grid editor introduced in Umbraco 7 has been removed from Umbraco 14. It's functionality is replaced with the Block Grid.
126+
The Grid editor introduced in Umbraco 7 can still be used in version 13, but has been removed from Umbraco 14. It's functionality is replaced with the Block Grid editor.
127127

128128
With Deploy migrators we have support for migrating Data Type configuration and property data between these property editors.
129129

@@ -146,6 +146,10 @@ internal sealed class DeployMigratorsComposer : IComposer
146146
}
147147
```
148148

149+
{% hint style="info" %}
150+
The project you're importing into needs to know about any custom legacy Grid editor configurations to correctly migrate to the Block Grid editor. Make sure to either copy the `grid.editors.config.js` and `package.manifest` (containing grid editors) files or override the `GetGridEditors()` method of the artifact migrator to provide this.
151+
{% endhint %}
152+
149153
These implementations make use of the following conventions to migrate the data:
150154

151155
- `ReplaceGridDataTypeArtifactMigrator`:

14/umbraco-deploy/deployment-workflow/import-with-migrations.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ Open source migrators may be built by HQ or the community for property editors f
122122

123123
#### Grid to Block Grid
124124

125-
The grid editor introduced in Umbraco 7 has been removed from Umbraco 14. It's functionality is replaced with the Block Grid.
125+
The Grid editor introduced in Umbraco 7 has been removed from Umbraco 14. It's functionality is replaced with the Block Grid.
126126

127127
With Deploy migrators we have support for migrating Data Type configuration and property data between these property editors.
128128

129-
You can configure the default migration with the following composer:
129+
Deploy adds the `ReplaceGridDataTypeArtifactMigrator` and `GridPropertyTypeMigrator` migrators by default, so using a custom migrator requires replacing the default ones:
130130

131131
```csharp
132132
using Umbraco.Cms.Core.Composing;
@@ -137,20 +137,24 @@ internal sealed class DeployMigratorsComposer : IComposer
137137
public void Compose(IUmbracoBuilder builder)
138138
{
139139
builder.DeployArtifactMigrators()
140-
.Append<ReplaceGridDataTypeArtifactMigrator>();
140+
.Replace<ReplaceGridDataTypeArtifactMigrator, CustomReplaceGridDataTypeArtifactMigrator>();
141141

142142
builder.DeployPropertyTypeMigrators()
143-
.Append<GridPropertyTypeMigrator>();
143+
.Replace<GridPropertyTypeMigrator, CustomGridPropertyTypeMigrator>();
144144
}
145145
}
146146
```
147147

148+
{% hint style="info" %}
149+
The project you're importing into needs to know about any custom legacy Grid editor configurations to correctly migrate to the Block Grid editor. Umbraco 14 doesn't support reading the `grid.editors.config.js` and `package.manifest` (containing grid editors) files anymore, so you have to provide this by overriding the `GetGridEditors()` method of the artifact migrator.
150+
{% endhint %}
151+
148152
These implementations make use of the following conventions to migrate the data:
149153

150154
- `ReplaceGridDataTypeArtifactMigrator`:
151155
- Grid layouts are migrated to an existing or new element type with an alias based on the layout name, prefixed with `gridLayout_` (this can be customized by overriding `MigrateGridTemplate()`);
152156
- Row configurations are migrated to an existing or new element type with an alias based on the row name, prefixed with `gridRow_` (this can be customized by overriding `MigrateGridLayout()`);
153-
- Similarly, grid editors are migrated to an existing or new element type with an alias based on the editor alias, prefixed with `gridEditor_` (this can be customized by overriding `MigrateGridEditor()`). The available editors are retrieved from the `grid.editors.config.js` files (can be overridden in `GetGridEditors()`). Each migrated grid editor will have the following property types added to the element type:
157+
- Similarly, grid editors are migrated to an existing or new element type with an alias based on the editor alias, prefixed with `gridEditor_` (this can be customized by overriding `MigrateGridEditor()`). The default editors used in version 13 are returned by `GetGridEditors()` and you can override this method to include your custom editors. Each migrated grid editor will have the following property types added to the element type:
154158
- The `media` grid editor is migrated to multiple properties: the `value` property contains the selected media item (using Media Picker v3), `altText` the alternate text (using a Textbox) and `caption` the caption (also using a Textbox);
155159
- The remaining grid editors create a single `value` property that uses the following editors:
156160
- `rte` - the default 'Rich Text Editor', falling back to the first `Umbraco.TinyMCE` editor.

0 commit comments

Comments
 (0)