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
To get started, let's create a simple `Page` collection that uses a permalink field.
35
35
36
-
<imgstyle="width: 960px; height: auto;"src="public/screenshot-page-schema.png"alt="Screenshot for Strapi permalinks plugin" />
36
+
<divalign="center">
37
+
<imgstyle="width: 960px; height: auto;"src="public/screenshot-page-schema.png"alt="Screenshot for Strapi permalinks plugin" />
38
+
</div>
37
39
38
40
Use the "Custom" tab in the content type builder to add the permalink field to the model.
39
41
40
-
<imgstyle="width: 960px; height: auto;"src="public/screenshot-content-type-builder.png"alt="Screenshot for Strapi permalinks plugin" />
42
+
<divalign="center">
43
+
<imgstyle="width: 960px; height: auto;"src="public/screenshot-content-type-builder.png"alt="Screenshot for Strapi permalinks plugin" />
44
+
</div>
41
45
42
46
After adding a permalink field through the content type builder, there are additional `targetField` and `targetRelation` props that will need to be manually added to the permalink schema attribute.
43
47
@@ -46,7 +50,6 @@ After adding a permalink field through the content type builder, there are addit
46
50
#### Schema for `Page`
47
51
```js
48
52
// src/api/page/content-types/page/schema.json
49
-
50
53
{
51
54
"kind":"collectionType",
52
55
"collectionName":"pages",
@@ -119,7 +122,7 @@ module.exports = {
119
122
config: {
120
123
contentTypes: [
121
124
{
122
-
uids: ['api::page.page'],
125
+
uids: ['api::page.page'],
123
126
},
124
127
],
125
128
},
@@ -147,7 +150,7 @@ module.exports = {
147
150
],
148
151
},
149
152
{
150
-
uids: ['api::help-page.help-page'],
153
+
uids: ['api::help-page.help-page'],
151
154
},
152
155
],
153
156
},
@@ -172,7 +175,7 @@ In order to use the full permalink URL for the "Copy permalink" feature or to us
@@ -313,11 +316,15 @@ Deleting an entity that has children will **orphan** those children. Strapi will
313
316
314
317
**If orphaned pages exist**, you will see their slug value in the content manager list view as a red label instead of plain text.
315
318
316
-
<imgstyle="width: 960px; height: auto;"src="public/screenshot-orphan-index.png"alt="Screenshot for Strapi permalinks plugin" />
319
+
<divalign="center">
320
+
<imgstyle="width: 960px; height: auto;"src="public/screenshot-orphan-index.png"alt="Screenshot for Strapi permalinks plugin" />
321
+
</div>
317
322
318
323
Editing the orphaned page will display a warning and an error message on the permalink field. From here you can assign a new parent or no parent at all. Upon saving, any children of the entity will also update their target fields to reflect to new parent permalinks.
319
324
320
-
<imgstyle="width: 960px; height: auto;"src="public/screenshot-orphan-edit.png"alt="Screenshot for Strapi permalinks plugin" />
325
+
<divalign="center">
326
+
<imgstyle="width: 960px; height: auto;"src="public/screenshot-orphan-edit.png"alt="Screenshot for Strapi permalinks plugin" />
0 commit comments