-
Yesterday while working i found that with shopify liquid it is possible to render a property inside an object on demand which may require additional db operation. Like the "collection" object in shopify liquid does not have a properly called "products" but when used like {{collection.products}} it outputs product list and instead of [productDrop] it shows [lazyProductDrop]. How can i achieve such usage in liquidjs? Please provide me an example. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @AsadCSE , please try Drops: https://liquidjs.com/tutorials/drops.html And alternatively, data properties in LiquidJS can be promises, like: liquid.parseAndRenderAsync("{{foo}}", {
foo: fetchSomethingAsync().then(obj => obj.foo)
}) |
Beta Was this translation helpful? Give feedback.
Hi @AsadCSE , please try Drops: https://liquidjs.com/tutorials/drops.html
And alternatively, data properties in LiquidJS can be promises, like: