Using dynamic sources
- Shopify documentation on metafields and dynamic sources
- Shopify documentation on metafields
- Shopify documentation on metaobjects
- Shopify documentation on displaying metafields on your online store
- Shopify documentation on connecting and displaying metaobjects
- Shopify documentation on custom data
- Shopify documentation on editing theme code
- Shopify documentation on the Shopify Partner Directory
- Shopify developer documentation on dynamic sources
- Shopify admin themes
Using metafields and metaobjects with dynamic sources
Section titled “Using metafields and metaobjects with dynamic sources”Metafields and metaobjects let you display dynamic information across your Shopify store. In Align, you can connect this custom data to compatible section or block settings in the theme editor.
Create the metafield or metaobject before connecting it in a template. For setup details, see Shopify’s documentation on displaying metafields on your online store and connecting and displaying metaobjects
For example, a candle seller could create a product metafield for burn time, add a burn-time block to a product template, and connect the block to that metafield. They could also create a collection metafield for a page listing burn times, then connect a block in the collection template to that data.
Dynamic sources work in compatible templates, sections, and blocks that display product, collection, page, blog, or blog post resources. For more detail about using metafields and metaobjects as dynamic sources, see Shopify’s Dynamic sources documentation.
Connect a dynamic source
Section titled “Connect a dynamic source”- From your Shopify admin, go to Online Store > Themes
- Find Align, then select Customize.
- Use the dropdown menu to select the template that contains the section you want to edit.
- Select an existing section to open its settings, or select + Add section.
- Select the dynamic source button for the relevant setting, then choose a dynamic source.
- Select Save.
Dynamic source selector
Section titled “Dynamic source selector”
Use the dynamic source selector to find and connect appropriate data directly in the Shopify theme editor. Its key features include:
- Resource selection
- When a block is connected to more than one resource, such as a product and a page, choose which resource’s metafields to search.
- This dropdown appears at the top of the dynamic source selector.
- Search and filtering
- Search and filter the available metafields to find the one you need more quickly.
- Category metafields
- Choose category metafields when they are available.
- These attributes become available after you assign a product category to a product.
- You can connect dynamic sources to relevant fields on the underlying attribute metaobject.
Usage notes
Section titled “Usage notes”- Create data first. Add the metafield or metaobject before connecting it to an Align theme setting.
- Check setting support. Only compatible settings in supported sections and blocks can use dynamic sources.
- Choose the right resource. When multiple resources are available, select the one that contains the metafield you want to display.