Basic Usage

Basic Usage

So you've created an association, related a few items, and you're ready to show them in your theme.

You can either use inline templates (faster/easier) or our JavaScript API (more control) to get the data into your store.

Using Inline Templates

To make things easy, We use MustacheJS to render out inline content. You'll need to add a few data attributes to any HTML element on your page.

In this example we're getting some related articles based on a product ID. This provides a quick easy way to render HTML markup without using JavaScript.

You can find the list of available fields for your target resource by referring to the Shopify API, or previewing the network request in your browser developer's console. Here's a preview of an example response:

As seen in the example above, you'll need to provide a few attributes to indicate the resource you're after.