Update type

This commit is contained in:
Jim LAURIE 2019-12-13 23:46:09 +01:00
parent 98c3e4b7cf
commit 40a9fb7d3d

View File

@ -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
![Singular Name Entries for Content Type](../assets/getting-started/tutorial/singular-name-entry.png 'Singular Name Entries or Content Type')
@ -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.
![Field Section Panel](../assets/getting-started/tutorial/field-selection-panel.png 'Field Selection Panel')
- Click on the `String` field
- Click on the `Text` field
- In the **Name** field, type `name`
![Restaurant Name Input Field](../assets/getting-started/tutorial/restaurant-name-input-field.png 'Restuarant Name Input Field')
@ -241,7 +241,7 @@ You may add your first field, a **String** field for the **Restaurant** name.
![Restaurant Name Advanced Settings](../assets/getting-started/tutorial/restaurant-name-advanced-settings.png 'Restuarant Name Advanced Settings')
- 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
![Restaurant Rich Text Field](../assets/getting-started/tutorial/restaurant-rich-text-field.png 'Restuarant Rich Text Field')
- 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
![Restaurant Rich Image Field Advanced Settings](../assets/getting-started/tutorial/restaurant-image-field-advanced-settings.png 'Restuarant Rich Image Field Advanced Settings')
- 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.
![Category Add Content Type](../assets/getting-started/tutorial/category-add-content-type.png 'Category Add Content Type')
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**
![Category Name Field](../assets/getting-started/tutorial/category-name-field.png 'Category Name Field')
- Click the `Done` button
- Click the `Continue` button
2. Now, you are ready to add fields to your **Category**:
![Category Fields](../assets/getting-started/tutorial/category-fields.png 'Category Fields')
- Click on the `String` field
- Click on the `Text` field
- In the **Name** field, type `name`
![Category Name Entry Field](../assets/getting-started/tutorial/category-name-entry-field.png 'Category Name Entry Fields')
@ -317,7 +316,7 @@ The `Category` **Content Type** will have a **String** field named `category`, a
![Category Advanced Settings](../assets/getting-started/tutorial/category-advanced-settings.png 'Category Advanced Settings')
- 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.
![Category Relation Many to Many](../assets/getting-started/tutorial/category-relation-many-to-many.png 'Category Relation Many to Many')
- Click the `Done` button
- Click the `Finish` button
![Category Save](../assets/getting-started/tutorial/category-save.png 'Category Save')
@ -347,9 +346,9 @@ This brings you to the **Add New Relation** screen.
![Category Save Strapi Restart](../assets/getting-started/tutorial/categor-create-strapi-restart.png 'Category Save Strapi Restart')
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`)
![Hours of Operation Add Component](../assets/getting-started/tutorial/hours-of-operation-add-compo.png 'Hours of Operation Add Component')
- Click the `Done` button
- Click the `continue` button
2. Now, you are ready to add fields to your **Component**:
![Hours of Operation Add Fields](../assets/getting-started/tutorial/hours-of-operation-add-fields.png 'Hours of Operation Add Fields')
- 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**
![Hours of Operation Days](../assets/getting-started/tutorial/hours-of-operation-days.png 'Hours of Operation Days')
@ -378,29 +379,29 @@ The `Restaurant` Content Type has a **Component** field named `Hours_of_operatio
![Hours of Operation Days Advanced Settings](../assets/getting-started/tutorial/hours-of-operation-days-advanced-settings.png 'Hours of Operation Days Advanced Settings')
- 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**.
![Hours of Operation Opening Hours](../assets/getting-started/tutorial/hours-of-operation-opening-hours.png 'Hours of Operation Opening Hours')
- Click on the `String` field
- Click on the `Text` field
- In the **Name** field, type `opening_hours`
![Hours of Operation Opening Hours Name](../assets/getting-started/tutorial/hours-of-operation-opening-hours-name.png 'Hours of Operation Opening Hours Name')
- 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**.
![Hours of Operation Closing Hours](../assets/getting-started/tutorial/hours-of-operation-closing-hours.png 'Hours of Operation Closing Hours')
- Click on the `String` field
- Click on the `Text` field
- In the **Name** field, type `closing_hours`
![Hours of Operation Closing Hours Name](../assets/getting-started/tutorial/hours-of-operation-closing-hours-name.png 'Hours of Operation Closing Hours Name')
- Click the `Done` button
- Click the `Finish` button
![Hours of Operation Save](../assets/getting-started/tutorial/hours-of-operation-save.png 'Hours of Operation Save')
@ -429,17 +430,20 @@ To access the **Hours_of_operation** Component from within the **Restaurant** Co
![Edit Restaurant Add Another Field](../assets/getting-started/tutorial/edit-restaurant-add-another-field.png 'Edit Restaurant Add Another Field')
- Click one of the `+ Add Another Field` buttons, to add the **Component**
- Click one of the `+ Add another field` button, to add the **Component**
![Edit Restaurant Component Field](../assets/getting-started/tutorial/edit-restaurant-group-field.png 'Edit Restaurant Component Field')
- Click on the `Component` field
- Select `Use an existing component` option
- Click on the `continue` button
![Restaurant Component Inputs](../assets/getting-started/tutorial/restaurant-group-inputs-use.png 'Restaurant Component Inputs')
- 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
![Restaurant Component Inputs](../assets/getting-started/tutorial/restaurant-group-inputs-use.png 'Restaurant Component Inputs')
![Restaurant Component Inputs](../assets/getting-started/tutorial/restaurant-group-inputs.png 'Restaurant Component Inputs')
- Click on the `ADVANCED SETTINGS` tab
@ -447,7 +451,7 @@ To access the **Hours_of_operation** Component from within the **Restaurant** Co
![Restaurant Component Advanced Settings](../assets/getting-started/tutorial/restaurant-group-advanced-settings.png 'Restaurant Component Advanced Settings')
- Click the `Done` button
- Click the `Finish` button
![Restaurant Component Save](../assets/getting-started/tutorial/restaurant-group-save.png 'Restaurant Component save')
@ -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
![Content Manager](../assets/getting-started/tutorial/content-manager-restaurant.png 'Content Manager')
- Click on the `Component(1)` tab
- Click on the `Set the component's layout`
![Content Manager Components Tab](../assets/getting-started/tutorial/content-manager-restaurant-group.png 'Content Manager Components Tab')
- Click on `Hours_of_operation` to modify the **View Settings**
![Content Manager Hoursofoperation](../assets/getting-started/tutorial/content-manager-hoursofoperation.png 'Content Manager Hoursofoperation')
- Rearrange the fields and make them more user friendly. Grab the `opening_hours` and slide it next to `closing_hours`
![Content Manager Hoursofoperation Rearrange Fields](../assets/getting-started/tutorial/content-manager-hoursofoperation-rearrange-fields.png 'Content Manager Hoursofoperation Rearrange Fields')