External Contexts
Specifications on pulling in dynamic data for use in DevHub
Overview
An external data source can be configured to be used as a dynamic data source outside the normal data you would be entering into DevHub or Google Sheets tied to DevHub projects.
Options
Support for endpoints that support the following formats:
JSON
XML
Custom API clients (requires integration)
Passing of Site/Landing page IDs along on the external context URL
Passing of URL parameters (full path, partial path, UTM parameters) along on the external context URL
Example External Context File
Below is an example of a simple JSON External Context that contains a JSON list of products with a nested array of values for each product.
Configuration Settings
Using data within templates and themes
Once configured, you will be able to access the External Context data from any Theme, HTML code module, or Template the same way you access other variables.
The key
value on the External Context setting defines what variable that your data will be mapped to. In the case below, the product_feed
variable was configured and the External Context was a list of products.
Last updated