How to add a product metafield to an HTML table cell?

Topic summary

Goal: display a product metafield inside an HTML table in the Dawn 2.0 theme.

Key points:

  • Suggested approach: insert Liquid in the table, e.g. {{ product.metafields.my_fields.subtitle }} to render a product metafield (metafield = custom data field on Shopify products; Liquid = Shopify’s templating language).
  • Limitation discovered: when the table is created in a regular Page and that Page is used as a dynamic source in a Product’s Collapsible content block, the metafield does not render. Reason: Page content does not support Liquid, so metafields won’t output there.

Outcome and actions:

  • To show metafields in a table, implement the table within a theme section/template that supports Liquid (e.g., create a custom section or modify the product template) rather than using a Page as content.
  • An external free tool to generate Shopify tables was suggested: https://webforward.github.io/shopify-tables/

Status: No direct solution via Page content; requires theme customization. Images are illustrative, not essential.

Summarized with AI on February 14. AI used: gpt-5.

Hello,

I am using the Dawn 2.0 theme. I have created page with a html table. I have also created a product metafield.

I would like to add this product metafield to one of the cells in this table. Is that possible?


| Test1 | Test2 | Test3 |
| - | - | - |
| Case A | 8 | 2 |
| Case B | 3 | 2 |
| Case C | 5 | 4 |

Hi @fro ,

You can get Metafields directly and add to table. For example for Metafields is subtitle

You just need to add the following code where you want to display the Metafields, it will work fine:

{{ product.metafields.my_fields.subtitle }}

Hope it helps!

Unfortunately, this does not seem to work.

I added a text metafield en copied the key/name to the html table in a new page.

Then I added the page as a dynamic source to the collapsible row on the product page.

Hi @fro ,

With page content displayed at ‘Collapsible content’, it would be impossible.

Because page content doesn’t support liquid code so if you want to add Metafield you need to create your own field and add code for it, instead of getting a content page.

Hope it is clear to you.

I was looking for a very similar thing to generate tables and ended up developing this free tool which can be implemented easily into your theme. https://webforward.github.io/shopify-tables/