Last active
December 21, 2015 18:59
-
-
Save sadache/6351625 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var api = Api.get("https://lesbonneschoses.prismic.io/api") | |
// Find all macarons | |
var products = api.then(function(api) { | |
return api.forms['products'] | |
.query('[[:d = at(document.tags, "Macaron")]]') | |
.ref(api.master) | |
.submit() | |
}) | |
// Display macarons | |
products.then(function(products) { | |
// go through products and display them | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment