Skip to main content
All CollectionsKeystone
Keystone: Displaying metafield content in product tables
Keystone: Displaying metafield content in product tables
Ryan avatar
Written by Ryan
Updated over a week ago

Summary


Using metafields you can display custom data within your product table.
โ€‹

Setting up your metafields


Displaying Product and Variant metafields within your product table:

  1. Within your theme editor navigate to 'Theme settings'

  2. Click 'Product cards'

  3. Scroll down to 'Table details'

  4. Enter the designated metafield you would like to display within your table

Use links below to save image.

Displaying custom data using metafields


Use the Metafield block to display custom data. This can be used to compare different properties or values of products in a side-by-side view. To do this follow the below steps

  1. Navigate to your Shopify admin and select Settings > Custom data

  2. Within the Metafield definitions click 'Products' and select 'Add definition'

  3. For this example we can use 'Weight'. Make sure the Namespace and key are labeled accordingly. For this example I chose: 'custom.weight'. Set the type to 'Multi-line text'.

  4. Within the Metaobject definitions click 'Add definition'. Set a name according to your metafield definition. For 'Type' select multi-line text and chose a name. For this example my metaobject key will be: 'weight.custom'.

  5. Navigate back to a product page within your Shopify admin, scroll to the bottom of the page. You should now see your 'Product metafields'. You can set the custom data within those fields.

  6. To display your custom data within your theme editor select the 'Product comparison' section > Add block > and select 'Metafield'.

    Use links below to save image.
  7. To display your custom data within your theme editor select the 'Product comparison' section > Add block > and select 'Metafield'.

Creating your metafield data


For more information see the attached screen shots below:

  • Navigating to custom data

Use links below to save image.
  • Adding a metafield definition

Use links below to save image.
  • Adding a metaobject definition

  • Add your text to the product metafields within your Shopify admin

    Use links below to save image.


โ€‹

Did this answer your question?