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
Copy file name to clipboardExpand all lines: docusaurus/docs/cms/features/content-type-builder.md
+32-45Lines changed: 32 additions & 45 deletions
Original file line number
Diff line number
Diff line change
@@ -17,22 +17,13 @@ import ScreenshotNumberReference from '/src/components/ScreenshotNumberReference
17
17
18
18
From the <Iconname="layout" /> Content-type Builder, accessible via the main navigation of the admin panel, users can create and edit their content types.
19
19
20
-
:::prerequisites Identity Card of the Content-type Builder
21
-
<Iconname="user"/> **Role & permission:**Minimum "Read" permission in Roles > Plugins - Content Type Builder. <br/>
22
-
<Iconname="laptop"/> **Environment:**Available in Development environment only.
23
-
:::
20
+
<IdentityCard>
21
+
<IdentityCardItemicon="user"title="Role & permission">Minimum "Read" permission in Roles > Plugins - Content Type Builder.</IdentityCardItem>
22
+
<IdentityCardItemicon="desktop"title="Environment">Available in Development environment only.</IdentityCardItem>
The <Iconname="layout" /> Content-type Builder allows the creation and management of content-types, which can be:
@@ -47,19 +38,22 @@ All 3 are displayed as categories in the sub navigation of the <Icon name="layou
47
38
Click the search icon <Iconname="magnifying-glass"classes="ph-bold" /> in the <Iconname="layout" /> Content-type Builder sub navigation to find a specific collection type, single type, or component.
48
39
:::
49
40
41
+
In the Content-type Builder's sub navigation is also displayed a centralised **Save** button that applies for all content-types and components. Along with the display of statuses for both content-types/components and fields, this allows you to work on several content-types and components at the same time. The following statuses can be displayed:
42
+
43
+
-`New` or `N` indicates that a content-type/component or field is new and hasn't been saved yet,
44
+
-`Modified` or `M` indicates that a content-type/component or field has been modified since the last save,
45
+
-`Deleted` or `D` indicates that a content-type/component or field has been deleted but that it will only be confirmed once saved.
46
+
47
+
:::note
48
+
Clicking on the **...** button next to **Save** gives access to other options, such as **Undo/Redo last change** and **Discard all changes**. These options are also centralised, meaning that they apply to the last action(s) that was/were done on all content-types, components and fields since the last time you saved.
49
+
:::
50
+
50
51
## Usage
51
52
52
53
<br/>
53
54
54
55
### Creating content-types
55
56
56
-
<!-- MAY BE REMOVED - FEELS REDUNDANT WITH ID CARD
57
-
58
-
:::note Development-only
59
-
The Content-type Builder is only accessible to create and update content-types when your Strapi application is in a development environment, else it will be in a read-only mode in other environments.
60
-
:::
61
-
-->
62
-
63
57
The Content-type Builder allows to create new content-types: single and collection types, but also components.
64
58
65
59
#### New content-type
@@ -77,14 +71,10 @@ The Content-type Builder allows to create new content-types: single and collecti
77
71
3. In the content-type creation window, write the name of the new content-type in the *Display name* textbox.
78
72
4. Check the *API ID* to make sure the automatically pre-filled values are correct. Collection type names are indeed automatically pluralized when displayed in the Content Manager. It is recommended to opt for singular names, but the *API ID* field allows to fix any pluralization mistake.
79
73
5. (optional) In the Advanced Settings tab, configure the available settings for the new content-type:
| Draft & publish | Tick the checkbox to allow entries of the content-type to be managed as draft versions, before they are published (see [Draft & Publish](/cms/features/draft-and-publish)). |
84
77
| Internationalization | Tick the checkbox to allow entries of the content-type to be translated into other locales. |
85
-
<!--
86
-
| Review workflows | <EnterpriseBadge /> Tick the checkbox to allow entries of the content-type to be managed through defined review stages (see [Managing Review Workflows](/cms/features/review-workflows#configuration)). |
87
-
-->
88
78
6. Click on the **Continue** button.
89
79
7. Add and configure chosen fields for your content-type (see [Configuring fields for content-types](#configuring-fields-content-type)).
90
80
8. Click on the **Save** button.
@@ -119,21 +109,20 @@ The Content-type Builder allows to manage all existing content-types. For an cho
- Click on the **Add new/another field** button <ScreenshotNumberReferencenumber="1" /> in the top right corner to add more fields to your content-type.
128
-
- In the table that displays the fields of your content-type <ScreenshotNumberReferencenumber="2" />, click on the <Iconname="pencil-simple" /> and/or <Iconname="trash" /> buttons to respectively edit and/or delete these fields.
129
-
- Click on the <Iconname="pencil-simple" /> **Edit** button <ScreenshotNumberReferencenumber="3" /> to access the basic and advanced settings of your content-type:
117
+
#### Settings
118
+
119
+
1. Click on the <Iconname="pencil-simple" /> **Edit** button of your content-type to access its settings.
The **Advanced Settings** tab allows to edit the following properties of the content-type or component:
155
-
156
143
<ThemedImage
157
144
alt="Content-type Builder's advanced settings"
158
145
sources={{
@@ -167,22 +154,23 @@ The Content-type Builder allows to manage all existing content-types. For an cho
167
154
</TabItem>
168
155
169
156
</Tabs>
157
+
3. Click the **Finish** button in the dialog.
158
+
4. Click the **Save** button in the Content-Type Builder navigation.
170
159
171
-
- Click on the **Save** button <ScreenshotNumberReferencenumber="4" /> to confirm any ongoing modification.
160
+
#### Fields
161
+
162
+
From the table that lists the fields of your content-type, you can:
163
+
- Click on the <Iconname="pencil-simple" /> button to access a field's basic and advanced settings to edit them
164
+
- Click on the **Add another field** buttons to create a new field for the selected content-type
165
+
- Click on the <Iconname="dots-six-vertical"classes="ph-bold"/> button and drag and drop any field to reorder the content-type's fields
166
+
- Click on the <Iconname="trash" /> button to delete a field
172
167
173
168
:::caution
174
169
Editing a field allows renaming it. However, keep in mind that regarding the database, renaming a field means creating a whole new field and deleting the former one. Although nothing is deleted from the database, the data that was associated with the former field name will not be accessible from the admin panel of your application anymore.
<!-- MAY BE REMOVED - FEELS REDUNDANT WITH ID CARD
180
-
181
-
:::note Development-only
182
-
The Content-type Builder is only accessible to create and update content-types when your Strapi application is in a development environment, else it will be in a read-only mode in other environments.
183
-
:::
184
-
-->
185
-
186
174
Content-types are composed of one or several fields. Each field is designed to contain specific kind of data, filled up in the Content Manager (see [Creating & Writing content](/cms/features/content-manager#creating--writing-content)).
187
175
188
176
In the <Iconname="layout" /> Content-type Builder, fields can be added at the creation of a new content-type or component, or afterward when a content-type or component is edited or updated.
@@ -533,8 +521,6 @@ The Password field displays a password field that is encrypted.
533
521
534
522
The Enumeration field allows to configure a list of values displayed in a drop-down list.
535
523
536
-
<!--- Add note about Enumeration fields known issues (i.e. recommending a relation using either oneWay or manyWay for some use-cases instead of enum) --->
537
-
538
524
<Tabs>
539
525
540
526
<TabItemvalue="base"label="Base settings">
@@ -708,6 +694,7 @@ Content types and components can be deleted through the Content-type Builder. De
708
694
2. In the edition interface of the chosen content-type or component, click on the <Iconname="pencil-simple" /> **Edit** button on the right side of the content-type's or component's name.
709
695
3. In the edition window, click on the **Delete** button.
710
696
4. In the confirmation window, confirm the deletion.
697
+
5. Click on the **Save** button in the Content-type Builder sub navigation.
711
698
712
699
:::caution
713
700
Deleting a content-type only deletes what was created and available from the Content-type Builder, and by extent from the admin panel of your Strapi application. All the data that was created based on that content-type is however kept in the database. For more information, please refer to the related <ExternalLinkto="https://github.com/strapi/strapi/issues/1114"text="GitHub issue"/>.
@@ -716,7 +703,7 @@ Deleting a content-type only deletes what was created and available from the Con
716
703
<ThemedImage
717
704
alt="Deletion of content type in Content-type Builder"
0 commit comments