Skip to content

Instantly share code, notes, and snippets.

@nickmealey
Last active May 5, 2016 15:45
Show Gist options
  • Save nickmealey/93c17b4e2047c534df9480a683a2c4b7 to your computer and use it in GitHub Desktop.
Save nickmealey/93c17b4e2047c534df9480a683a2c4b7 to your computer and use it in GitHub Desktop.
# -- Collection many to many Pages --
# templates/collection.liquid
<div data-relatable="collection.pages" data-relatable-id="{{collection.id}}">
{% raw %}
{{#pages}}
<a href="/pages/{{handle}}">{{title}}</a>
{{/pages}}
{% endraw %}
</div>
# templates/page.liquid
<div data-relatable="page.collections" data-relatable-id="{{page.id}}">
{% raw %}
{{#collections}}
<a href="/collections/{{handle}}">{{title}}</a>
{{/collections}}
{% endraw %}
</div>
# -- Product many to many Article --
# templates/product.liquid
<div data-relatable="product.articles" data-relatable-id="{{product.id}}">
{% raw %}
{{#articles}}
<a href="/articles/{{id}}">{{title}}</a>
{{/articles}}
{% endraw %}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment