Dynamic Sources

For sections and blocks contained within a JSON template, merchants have the option to link one or more dynamic sources to settings, depending on the type of setting.

Dynamic sources can be:

  • Metafield values
  • Resource attributes
Note

Dynamic sources are not applicable to general theme settings.

Available Values

SHOPLINE determines the values for each type of available dynamic source based on:

  • The resources associated with the template where the section is located
  • The resource settings in the current setting context

For example:

ConditionDescription
Section as part of a product templateMetafields and attributes associated with the product will be accessible for:
  • Section configuration;
  • Block configuration within the section
Section as part of a collection templateMetafields and attributes associated with the collection will be accessible for:
  • Section configuration;
  • Block configuration within the section
Current section or block contains product settingsThe product's metafields and attributes will be available for section or block settings
Current section or block contains collection settingsThe collection's metafields and attributes will be available for section or block settings

The table below displays the available resources along with their respective attributes:

ResourceAttributes
product
  • title
  • vendor
collectiontitle
Note

More resources and resource attributes will be available in the future.

The following table outlines which settings and metafield types will be supported:

SettingMetafield
text
  • single_line_text_field
  • number_decimal
  • number_integer
textarea
  • single_line_text_field
  • multi_line_text_field
  • number_decimal
  • number_integer
richtext
  • single_line_text_field
  • multi_line_text_field
  • number_decimal
  • number_integer
color_picker
  • color
file_picker
  • file_reference
image_picker
  • file_reference
url
  • url
page_picker
  • page_reference
product_picker
  • product_reference
Was this article helpful to you?

Error loading component.

Error loading component.