Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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?
<table width="100%">
<tbody>
<tr>
<td style="width: 35.0423%;">Test1</td>
<td style="width: 26.9577%;">Test2</td>
<td style="width: 31%;">Test3</td>
</tr>
<tr>
<td style="width: 35.0423%;">Case A</td>
<td style="width: 26.9577%;">8</td>
<td style="width: 31%;">2</td>
</tr>
<tr>
<td style="width: 35.0423%;">Case B</td>
<td style="width: 26.9577%;">3</td>
<td style="width: 31%;">2</td>
</tr>
<tr>
<td style="width: 35.0423%;">Case C</td>
<td style="width: 26.9577%;">5</td>
<td style="width: 31%;">4</td>
</tr>
</tbody>
</table>
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/
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025