Merchant guide · Blocks

Metafield content

Shows a product metafield as text, list or table, e.g. care instructions.

What it looks like

Computer
“Metafield content” on a phone. (Show larger)
Phone

Marked in the picture

The numbers in the computer picture show where each setting appears.

  1. 1 = Text (if the metafield is empty)

Example from the demo store OSTRA.

Where do I find it?

  1. Online Store
  2. Themes
  3. Customize
  4. Choose the page at the top: “Products › Default product”
  5. Add block
  6. Product: content
  7. Metafield content

This block shows data of the current product and only works on product pages. For a product on other pages, use Featured product.

How to set it up

Metafield content

Shown with default values. Fields that only appear after another setting is changed are folded away below.

Heading

Default: Details

Text in double square brackets is highlighted, e.g. [[refill]].

Metafield

empty

Format namespace.key, e.g. custom.care (Settings → Custom data). If empty, the text below is shown.

Marker 1 Text (if the metafield is empty)

empty

Text in double square brackets is highlighted, e.g. [[refill]].

Appearance

Collapsible
Default: On

Only with a heading.

Open by default
Default: Off

Only shown when “Collapsible” is on and “Heading” is filled in.

More fields when “Metafield” is filled in (1)

Display

Default: Automatic
4 options
  • Automatic
  • Text
  • List
  • Table

List: list metafield or one line per entry. Table: one “Label: value” line per entry or a JSON metafield.

Tips

  • Metafield format: namespace.key, e.g. custom.care.
  • If the metafield is empty, the text from the block appears.
  • “Collapsible” only works with a heading.

Metafield content

Enlarged picture