Ecb draft

From Posstack.com Documentations

Example 1: Recipe page

Introduction

Before jumping into the detailed steps, you can check out the live demo of the recipe: click to view.

Recipe post anatomy

You can display the recipes in a classic cookbook style, including:

  • Images or videos of the recipe
  • List of ingredients
  • Cooking instructions
  • Additional notes
  • Additionally, you can incorporate product placements directly into the recipe pages for cross-promotion purposes.

Why use metaobjects for the Recipe pages?

Using metaobjects for Recipe pages allows you to:

  • Utilize a single metaobject template for all recipe pages.
  • Display unique content for each recipe, such as Ingredients, Method, Preparation time, Process shots or videos, and more.
  • Store and manage all recipe content directly in your Shopify admin.
  • Reuse recipe content to be displayed on multiple pages according to your preference.

Steps

1. Create metaobjects

We've defined two metaobjects for the Recipe: ECB Media and ECB Rich Text. Check out the screenshot below.

For steps to create a metaobject definition with just one click, click here.

Recipe-metaobject-definitions.jpg

2. Add metaobject entries

Next, we added metaobject entries for ECB Media and ECB Rich Text.

  • ECB Media is where we store sample cooking images.
  • ECB Rich Text is where we store sample Cooking methods, ingredients, how-to steps, etc.
For steps to add metaobject entries, click here.

ECB Media entry: Recipe-entries-media.jpg

ECB Rich Text entry: Recipe-entries-text.jpg

Check out the different sample recipes on our live demo. Each recipe is linked to an ECB Media entry and ECB Rich Text entry.

Recipe-entries-list.jpg

3. Create the template

After adding custom data (also known as Metaobject entries) for the Recipe, the next step is to create a Metaobject template to showcase this data on the storefront.

For steps to create a template, click here.
Consider using the blog post to create your Recipe pages. This allows you to utilize the default Shopify listing page, displaying all your recipes with pagination. You can still customize the page layout in a versatile multi-column format (ranging from 1 to 4 columns) to showcase your recipes, such as this example.

Once you have finished creating the Recipe template, you will be directed to the Theme Editor, where you can begin customizing the template.

Note: After creating a template, you can always return to edit your recipe template in the Manage Templates section.
Recipe-edit-metaobject-template.jpg

4. Add sections

Finally, you'll need to add sections and link them to the Metaobject data to showcase your recipe on your theme.

For steps to add sections to a template, click here.

Below are the sections we included in this sample recipe. You will be able to see which section is linked to which metaobject entry.

Recipe-template-sections.jpg

You can check out the live demo of the recipe: click to view.