metafield
Metafield information for a specific object.
For more information on how to access the metafield information for a specific object, refer to get_metafields.
Metafields support storing information in various data types. To output metafield content in specific data types and formats, use the metafield_text filter and the metafield_tag tag.
Properties
Whether the value in the metafield is a list.
true: The value in the metafield a list.false: The value in the metafield is not a list.
The type of the metafield.
| Possible values | Description |
|---|---|
| single_line_text_field | Single-line text |
| multi_line_text_field | Multi-line text |
| rich_text_field | Rich text |
| product_reference | Product |
| collection_reference | Product collection |
| variant_reference | Product variant |
| page_reference | Page |
| file_reference | File |
| number_integer | Integer |
| number_decimal | Decimal |
| date | Date |
| date_time | Date and time |
| url_reference | URL |
| json | JSON |
| boolean | Boolean |
| color | Color |
| weight | Weight |
| volume | Volume |
| dimension | Dimension |
| rating | Rating |
| money | Amount |
The value of the metafield.
The following table describes the data formats supported by the value of each metafield type.
| Type | Return value format |
|---|---|
| A string |
| Rich text (supports headings, lists, bold, italics, and links) |
| A product object |
| A collection object |
| A variant object |
| A page object |
| A generic_file, image or video object |
| A number |
| A date string (you can use the date filter to format the string) |
| A URL string |
| A JSON object |
| A boolean value |
| A color object |
| A measurement object |
| A rating object |
| A money object |