Liane docs › Guides
Metafields
Metafields hold extra information on a product, such as its material, pigment or recommended age. Connect a setting to a metafield and each product shows its own value in the same block.
Create a metafield
- In your admin, go to Settings › Custom data › Products and add a definition. Choose a name (for example Material) and a type: single-line text for a short value, multi-line text for a table.
- Open a product and fill in the new field near the bottom of the page.
Connect it in the theme editor
- Open a product in the theme editor and select the block, for example Product facts.
- Next to a setting, choose the Connect dynamic source icon, then pick your metafield.
The setting now shows each product’s own value. Leave the metafield empty on a product and that row or block is left out.
Where metafields help in Liane
- Product facts: up to six rows, each a label and a value. Connect each Value to a metafield. With the pencil the facts show as a specimen card, with the felt-tip pen as an engraved card, and with the wax crayon as stickers.
- Chart: connect Table to a multi-line text metafield to give each product its own size or format table. See Color and size charts.
- Text and Collapsible row blocks: connect their text to show care instructions, ingredients or other product-specific notes.
- Product ratings: star ratings on cards come from Shopify’s standard rating fields, filled by a reviews app. Turn them on in Theme settings › Product cards › Show product rating.
Article metafields
Articles can have metafields too: add definitions under Settings › Custom data › Blog posts. In the Article section, connect the Product block’s product or the Pull quote block’s quote to one, so each article shows its own product or quote in the same place.