
Under Users & Permissions Plugin, choose Roles (opens new window). Click on General Settings at the bottom of the main navigation. But first, we need to make sure that the content is publicly accessible through the API: We now have enough content to consume (pun intended). We have just added a restaurant and 2 categories. In the right sidebar, in the Categories drop-down list, select "Brunch". Go to Content Manager > Collection types - Restaurant (opens new window) in the navigation, and click on "Biscotte Restaurant". The "French Food" and "Brunch" categories are now listed in the Collection types - Category (opens new window) view. Type Brunch in the Name field, then click Save. Go back to Collection types - Category, then click again on Add new entry. Let's go to Content Manager > Collection types - Category (opens new window) and create 2 categories: The restaurant is now listed in the Collection types - Restaurant (opens new window) view. If you're lacking some inspiration, you can use Welcome to Biscotte restaurant! Restaurant Biscotte offers a cuisine based on fresh, quality products, often local, organic when possible, and always produced by passionate producers. In the Description field, write a few words about it. Type the name of your favorite local restaurant in the Name field. Go to Content Manager > Collection types - Restaurant (opens new window) in the navigation. # Create an entry for the "Restaurant" collection type Now that we have created a basic data structure with 2 collection types, "Restaurant" and "Category", let's use them to actually add content by creating new entries. # Step 2: Use the collection types to create new entries Finally, click Finish, then the Save button, and wait for Strapi to restart. The text should read Categories has and belongs to many Restaurants. In the center, select the icon that represents "many-to-many". On the right side, click the Category relational fields box and select "Restaurant". Type Category for the Display name, and click Continue. Let's create a "Category" collection type: It would help getting a bit more organized if our restaurants directory had some categories. Wow, you have just created your very first content-type! It was so cool - let's create another one right now, just for pleasure. Once Strapi has restarted, "Restaurant" is listed under Content Manager > Collection types in the navigation. Finally, click Save and wait for Strapi to restart. Type description under the Name field, then click Finish. Switch to the Advanced Settings tab, and check the Required field and the Unique field settings. Type Restaurant for the Display name, and click Continue. Go to Plugins Content-type Builder (opens new window) in the main navigation.
Then we can describe the fields to display when adding a new restaurant entry: Your restaurants directory will eventually include many restaurants, so we need to create a "Restaurant" collection type. When creating an empty project with Strapi, this is where to get the party started! # Create a "Restaurant" collection type The Content-type Builder plugin helps you create your data structure.
# Step 1: Create collection types with the Content-type Builder If the server is not already running, in your terminal, cd into the my-project folder and run npm run develop (or yarn develop) to launch it.