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.
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.
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/