mirror of
https://github.com/strapi/strapi.git
synced 2025-12-25 06:04:29 +00:00
Update type
This commit is contained in:
parent
98c3e4b7cf
commit
40a9fb7d3d
@ -212,9 +212,9 @@ You need to create a new **Content Type** for `Restaurants`.
|
||||
|
||||
1. Complete these steps to **Add a Restaurant Content Type**
|
||||
|
||||
- Click the `+ Add A Content Type` link (under existing **CONTENT TYPES**)
|
||||
- Enter a **Name** for your new **Content Type** (call this `restaurant`), and you can write `Restaurant Listings` for the **Description**
|
||||
- Click the `Done` button
|
||||
- Click the `+ Create new content-type` link (under existing **CONTENT TYPES**)
|
||||
- Enter a **Name** for your new **Content Type** (call this `restaurant`)
|
||||
- Click the `Continue` button
|
||||
|
||||

|
||||
|
||||
@ -226,11 +226,11 @@ The Content Type **Name** is always **singular**. For example, `restaurant` not
|
||||
|
||||
2. You are now at the **Field Selection** panel
|
||||
|
||||
You may add your first field, a **String** field for the **Restaurant** name.
|
||||
You may add your first field, a **Text** field for the **Restaurant** name.
|
||||
|
||||

|
||||
|
||||
- Click on the `String` field
|
||||
- Click on the `Text` field
|
||||
- In the **Name** field, type `name`
|
||||
|
||||

|
||||
@ -241,7 +241,7 @@ You may add your first field, a **String** field for the **Restaurant** name.
|
||||
|
||||

|
||||
|
||||
- Click the `+ Add Another Field` button
|
||||
- Click the `+ Add another field` button
|
||||
|
||||
You are now ready to add the second field, a **Rich Text** field for the **Restaurant** description.
|
||||
|
||||
@ -253,7 +253,7 @@ You are now ready to add the second field, a **Rich Text** field for the **Resta
|
||||
|
||||

|
||||
|
||||
- Click the `+ Add Another Field` button
|
||||
- Click the `+ Add another field` button
|
||||
|
||||
You are now ready to add the third field, a **Media** field for the **Restaurant** thumbnail image.
|
||||
|
||||
@ -270,7 +270,7 @@ You are now ready to add the third field, a **Media** field for the **Restaurant
|
||||
|
||||

|
||||
|
||||
- Click the `Done` button
|
||||
- Click the `Finish` button
|
||||
|
||||
Your new Content Type called **Restaurant** is ready to be **Saved**.
|
||||
|
||||
@ -288,25 +288,24 @@ After Strapi has restarted, you are ready to continue to create the `Category` *
|
||||
|
||||
### The Category Content Type
|
||||
|
||||
The `Category` **Content Type** will have a **String** field named `category`, and a **Relation field** with a **Many to Many** relationship.
|
||||
The `Category` **Content Type** will have a **Text** field named `category`, and a **Relation field** with a **Many to Many** relationship.
|
||||
|
||||

|
||||
|
||||
1. Complete these steps to **add a Category Content Type**:
|
||||
|
||||
- Click the `+ Add A Content Type` link
|
||||
- Click the `+ Create new content-type` link
|
||||
- Enter a **Name** for your new **Content Type** (call this `category`)
|
||||
- Enter `Restaurant Categories` for the **Description**
|
||||
|
||||

|
||||
|
||||
- Click the `Done` button
|
||||
- Click the `Continue` button
|
||||
|
||||
2. Now, you are ready to add fields to your **Category**:
|
||||
|
||||

|
||||
|
||||
- Click on the `String` field
|
||||
- Click on the `Text` field
|
||||
- In the **Name** field, type `name`
|
||||
|
||||

|
||||
@ -317,7 +316,7 @@ The `Category` **Content Type** will have a **String** field named `category`, a
|
||||
|
||||

|
||||
|
||||
- Click the `+ Add Another Field` button
|
||||
- Click the `+ Add another field` button
|
||||
|
||||
You are now ready to add the second field, a **Relation** field for creating a **Many to Many** relationship between the **Category** and **Restaurant** Content Types.
|
||||
|
||||
@ -337,7 +336,7 @@ This brings you to the **Add New Relation** screen.
|
||||
|
||||

|
||||
|
||||
- Click the `Done` button
|
||||
- Click the `Finish` button
|
||||
|
||||

|
||||
|
||||
@ -347,9 +346,9 @@ This brings you to the **Add New Relation** screen.
|
||||
|
||||

|
||||
|
||||
After Strapi has restarted, you are ready to create a `Component and Repeatable Field` called **"Hours of Operations."**
|
||||
After Strapi has restarted, you are ready to create a `Component` called **"Hours of Operations."**
|
||||
|
||||
## 5. Create a new Component, and Repeatable Field called, "Hours of Operation"
|
||||
## 5. Create a new Component called, "Hours of Operation"
|
||||
|
||||
### The Hours of Operation Component
|
||||
|
||||
@ -357,18 +356,20 @@ The `Restaurant` Content Type has a **Component** field named `Hours_of_operatio
|
||||
|
||||
1. Complete these steps to **add a new Component**:
|
||||
|
||||
- Click the `+ Add A Component` link to add a new **Component**
|
||||
- Enter a **Name** for your new **Component** (call this `hours_of_operation`), and you can write `Hours of Operation` for the **Description**
|
||||
- Click the `+ Create new component` link to add a new **Component**
|
||||
- Enter a **Name** for your new **Component** (call this `hours_of_operation`)
|
||||
- Select the icon of your choice
|
||||
- Create a new category for your **Component** (call it `hours`)
|
||||
|
||||

|
||||
|
||||
- Click the `Done` button
|
||||
- Click the `continue` button
|
||||
|
||||
2. Now, you are ready to add fields to your **Component**:
|
||||
|
||||

|
||||
|
||||
- Click on the `String` field
|
||||
- Click on the `Text` field
|
||||
- In the **Name** field, type `day_interval`. This is to enter the **Day (or Days)** with **Hours of Operation**
|
||||
|
||||

|
||||
@ -378,29 +379,29 @@ The `Restaurant` Content Type has a **Component** field named `Hours_of_operatio
|
||||
|
||||

|
||||
|
||||
- Click the `+ Add Another Field`
|
||||
- Click the `+ Add another field`
|
||||
|
||||
You are now ready to add a second field, another **String** field for the **Opening Hours**.
|
||||
You are now ready to add a second field, another **Text** field for the **Opening Hours**.
|
||||
|
||||

|
||||
|
||||
- Click on the `String` field
|
||||
- Click on the `Text` field
|
||||
- In the **Name** field, type `opening_hours`
|
||||
|
||||

|
||||
|
||||
- Click the `+ Add Another Field` button
|
||||
- Click the `+ Add another field` button
|
||||
|
||||
You are now ready to add a third field, another **String** field for the **Closing Hours**.
|
||||
You are now ready to add a third field, another **Text** field for the **Closing Hours**.
|
||||
|
||||

|
||||
|
||||
- Click on the `String` field
|
||||
- Click on the `Text` field
|
||||
- In the **Name** field, type `closing_hours`
|
||||
|
||||

|
||||
|
||||
- Click the `Done` button
|
||||
- Click the `Finish` button
|
||||
|
||||

|
||||
|
||||
@ -429,17 +430,20 @@ To access the **Hours_of_operation** Component from within the **Restaurant** Co
|
||||
|
||||

|
||||
|
||||
- Click one of the `+ Add Another Field` buttons, to add the **Component**
|
||||
- Click one of the `+ Add another field` button, to add the **Component**
|
||||
|
||||

|
||||
|
||||
- Click on the `Component` field
|
||||
- Select `Use an existing component` option
|
||||
- Click on the `continue` button
|
||||
|
||||

|
||||
|
||||
- Ensure `hours_of_operation` is displayed in the **Select a component** dropdown
|
||||
- Provide a **name** for this component in the **Restaurant** Content Type. E.g., `restaurant_hours`
|
||||
- Check the `Repeatable field` box
|
||||
- Select the `Repeatable component` option
|
||||
|
||||

|
||||

|
||||
|
||||
- Click on the `ADVANCED SETTINGS` tab
|
||||
@ -447,7 +451,7 @@ To access the **Hours_of_operation** Component from within the **Restaurant** Co
|
||||
|
||||

|
||||
|
||||
- Click the `Done` button
|
||||
- Click the `Finish` button
|
||||
|
||||

|
||||
|
||||
@ -463,18 +467,14 @@ After Strapi has restarted, you are ready to continue to the next section where
|
||||
|
||||
You can _drag and drop_ fields into a different layout, as well as, _rename the labels_ as two examples of how you can customize the user interface for your **Content Types**.
|
||||
|
||||
- Navigate to and click on the `Content Manager`, under **PLUGINS** in the left-hand menu
|
||||
- Click on the `Configure the view`, button
|
||||
|
||||

|
||||
|
||||
- Click on the `Component(1)` tab
|
||||
- Click on the `Set the component's layout`
|
||||
|
||||

|
||||
|
||||
- Click on `Hours_of_operation` to modify the **View Settings**
|
||||
|
||||

|
||||
|
||||
- Rearrange the fields and make them more user friendly. Grab the `opening_hours` and slide it next to `closing_hours`
|
||||
|
||||

|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user