Skip to content

Commit b80ca48

Browse files
committedApr 29, 2025·
Port PR #2480: Content-type Builder revamp (stable release) to next branch
1 parent 70c50e4 commit b80ca48

File tree

5 files changed

+32
-45
lines changed

5 files changed

+32
-45
lines changed
 

‎docusaurus/docs/cms/features/content-type-builder.md

Lines changed: 32 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,13 @@ import ScreenshotNumberReference from '/src/components/ScreenshotNumberReference
1717

1818
From the <Icon name="layout" /> Content-type Builder, accessible via the main navigation of the admin panel, users can create and edit their content types.
1919

20-
:::prerequisites Identity Card of the Content-type Builder
21-
<Icon name="user"/> **Role & permission:** Minimum "Read" permission in Roles > Plugins - Content Type Builder. <br/>
22-
<Icon name="laptop"/> **Environment:** Available in Development environment only.
23-
:::
20+
<IdentityCard>
21+
<IdentityCardItem icon="user" title="Role & permission">Minimum "Read" permission in Roles > Plugins - Content Type Builder.</IdentityCardItem>
22+
<IdentityCardItem icon="desktop" title="Environment">Available in Development environment only.</IdentityCardItem>
23+
</IdentityCard>
2424

2525
## Overview
2626

27-
<!-- Replace with Guideflow -->
28-
<!-- <ThemedImage
29-
alt="Content-type Builder interface"
30-
sources={{
31-
light: '/img/assets/content-type-builder/content-types-builder.png',
32-
dark: '/img/assets/content-type-builder/content-types-builder_DARK.png',
33-
}}
34-
/> -->
35-
3627
<Guideflow lightId="vkm9jeqb2p" darkId="lpnz47qtep" />
3728

3829
The <Icon name="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
4738
Click the search icon <Icon name="magnifying-glass" classes="ph-bold" /> in the <Icon name="layout" /> Content-type Builder sub navigation to find a specific collection type, single type, or component.
4839
:::
4940

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+
5051
## Usage
5152

5253
<br/>
5354

5455
### Creating content-types
5556

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-
6357
The Content-type Builder allows to create new content-types: single and collection types, but also components.
6458

6559
#### New content-type
@@ -77,14 +71,10 @@ The Content-type Builder allows to create new content-types: single and collecti
7771
3. In the content-type creation window, write the name of the new content-type in the *Display name* textbox.
7872
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.
7973
5. (optional) In the Advanced Settings tab, configure the available settings for the new content-type:
80-
8174
| Setting name | Instructions |
8275
|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
8376
| 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)). |
8477
| 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-
-->
8878
6. Click on the **Continue** button.
8979
7. Add and configure chosen fields for your content-type (see [Configuring fields for content-types](#configuring-fields-content-type)).
9080
8. Click on the **Save** button.
@@ -119,21 +109,20 @@ The Content-type Builder allows to manage all existing content-types. For an cho
119109
<ThemedImage
120110
alt="Content-type Builder's edition interface"
121111
sources={{
122-
light: '/img/assets/content-type-builder/content-types-builder_edition.png',
123-
dark: '/img/assets/content-type-builder/content-types-builder_edition_DARK.png',
112+
light: '/img/assets/content-type-builder/new_CTB.png',
113+
dark: '/img/assets/content-type-builder/new_CTB_DARK.png',
124114
}}
125115
/>
126116

127-
- Click on the **Add new/another field** button <ScreenshotNumberReference number="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 <ScreenshotNumberReference number="2" />, click on the <Icon name="pencil-simple" /> and/or <Icon name="trash" /> buttons to respectively edit and/or delete these fields.
129-
- Click on the <Icon name="pencil-simple" /> **Edit** button <ScreenshotNumberReference number="3" /> to access the basic and advanced settings of your content-type:
117+
#### Settings
118+
119+
1. Click on the <Icon name="pencil-simple" /> **Edit** button of your content-type to access its settings.
120+
2. Edit the available settings of your choice:
130121

131122
<Tabs groupId="CTSettings">
132123

133124
<TabItem value="CTBasicSettings" label="Basic settings">
134125

135-
The **Basic Settings** tab allows to edit the following properties of the content-type or component:
136-
137126
<ThemedImage
138127
alt="Content-type Builder's basic settings"
139128
sources={{
@@ -151,8 +140,6 @@ The Content-type Builder allows to manage all existing content-types. For an cho
151140

152141
<TabItem value="CTAdvancedSettings" label="Advanced settings">
153142

154-
The **Advanced Settings** tab allows to edit the following properties of the content-type or component:
155-
156143
<ThemedImage
157144
alt="Content-type Builder's advanced settings"
158145
sources={{
@@ -167,22 +154,23 @@ The Content-type Builder allows to manage all existing content-types. For an cho
167154
</TabItem>
168155

169156
</Tabs>
157+
3. Click the **Finish** button in the dialog.
158+
4. Click the **Save** button in the Content-Type Builder navigation.
170159

171-
- Click on the **Save** button <ScreenshotNumberReference number="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 <Icon name="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 <Icon name="dots-six-vertical" classes="ph-bold"/> button and drag and drop any field to reorder the content-type's fields
166+
- Click on the <Icon name="trash" /> button to delete a field
172167

173168
:::caution
174169
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.
175170
:::
176171

177172
### Configuring content-types fields {#configuring-fields-content-type}
178173

179-
<!-- 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-
186174
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)).
187175

188176
In the <Icon name="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.
533521

534522
The Enumeration field allows to configure a list of values displayed in a drop-down list.
535523

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-
538524
<Tabs>
539525

540526
<TabItem value="base" label="Base settings">
@@ -708,6 +694,7 @@ Content types and components can be deleted through the Content-type Builder. De
708694
2. In the edition interface of the chosen content-type or component, click on the <Icon name="pencil-simple" /> **Edit** button on the right side of the content-type's or component's name.
709695
3. In the edition window, click on the **Delete** button.
710696
4. In the confirmation window, confirm the deletion.
697+
5. Click on the **Save** button in the Content-type Builder sub navigation.
711698

712699
:::caution
713700
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 <ExternalLink to="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
716703
<ThemedImage
717704
alt="Deletion of content type in Content-type Builder"
718705
sources={{
719-
light: '/img/assets/content-type-builder/ctb-delete.png',
720-
dark: '/img/assets/content-type-builder/ctb-delete_DARK.png',
706+
light: '/img/assets/content-type-builder/new_CTB_deletion.png',
707+
dark: '/img/assets/content-type-builder/new_CTB_deletion_DARK.png',
721708
}}
722709
/>
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.