Skip to content

Commit 7c4871e

Browse files
committed
DOCS pages to widgets review
1 parent b9d6dd8 commit 7c4871e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Migration.Tool.Extensions/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ This migration allows you to migrate pages from the source instance as [widgets]
7878
- If you have a page with content stored in page fields, you can migrate the values of the fields into widget properties and display the content as a widget.
7979
- If you have a page that serves as a listing and displays content from child pages, you can convert the child pages into widgets and as content items in the content hub, then link them from the widgets.
8080

81-
> :warning: The target page (with an [Page Builder editable area](https://docs.kentico.com/x/7AWiCQ)) and any [Page Builder components](https://docs.kentico.com/x/6QWiCQ) used in the migration need to be present in the system before you migrate content.
81+
> :warning: The target page (with a [Page Builder editable area](https://docs.kentico.com/x/7AWiCQ)) and any [Page Builder components](https://docs.kentico.com/x/6QWiCQ) used in the migration need to be present in the system before you migrate content. The target page must be either the page itself or any ancestor of the page from which the content is migrated.
8282
8383
In `Migration.Tool.Extensions/CommunityMigrations`, create a new file with a class that inherits from the `ContentItemDirectorBase` class and override the `Direct(source, options)` method:
8484

85-
1. Ensure that the target page has a [page template](https://docs.kentico.com/x/iInWCQ).
85+
1. If the target page uses a [page template](https://docs.kentico.com/x/iInWCQ), ensure that the correct page template is applied.
8686

8787
```csharp
8888
// Store page uses a template and is the parent listing page
@@ -104,6 +104,7 @@ In `Migration.Tool.Extensions/CommunityMigrations`, create a new file with a cla
104104
// Determines where to place the widget
105105
options.Location
106106
// Negative indexing is used - '-1' signifies direct parent node
107+
// Use the value of '0' if you want to target the page itself
107108
.OnAncestorPage(-1)
108109
.InEditableArea("main-area")
109110
.InSection("SingleColumnSection")

0 commit comments

Comments
 (0)