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:
| Condition | Description |
|---|---|
| Section as part of a product template | Metafields and attributes associated with the product will be accessible for:
|
| Section as part of a collection template | Metafields and attributes associated with the collection will be accessible for:
|
| Current section or block contains product settings | The product's metafields and attributes will be available for section or block settings |
| Current section or block contains collection settings | The 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:
| Resource | Attributes |
|---|---|
| product |
|
| collection | title |
Note
More resources and resource attributes will be available in the future.
The following table outlines which settings and metafield types will be supported:
| Setting | Metafield |
|---|---|
| text |
|
| textarea |
|
| richtext |
|
| color_picker |
|
| file_picker |
|
| image_picker |
|
| url |
|
| page_picker |
|
| product_picker |
|
Was this article helpful to you?