Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

usage not allowed in this context #1074

Open
drinkmorewaters opened this issue Nov 18, 2019 · 2 comments
Open

usage not allowed in this context #1074

drinkmorewaters opened this issue Nov 18, 2019 · 2 comments

Comments

@drinkmorewaters
Copy link

drinkmorewaters commented Nov 18, 2019

https://community.shopify.com/c/Technical-Q-A/Include-usage-not-allowed-in-this-context-in-product-page-Debut/td-p/598022/page/2

https://help.shopify.com/en/themes/liquid/tags/theme-tags#render

The include tag breaking change might catch some people. Shopify has changed from 'include' to 'render' for sections but slate does or doesn't support it?

Either way, broke our theme. If you get the error do below.

Don't use the latest

{% render 'section-name %}

use the soon to be deprecated

{% include 'section-name %}

@floatingdino
Copy link

You can upload liquid files with the render tag using Slate, but if you use render the snippet can't use include anywhere down the chain.

@curiouscrusher
Copy link

I've been using {% render 'snippetName' %} within Slate for quite some time now and haven't had any issues. I think you'll find the fundamental change between how {% include %} and {% render %} work is more than likely the root cause of your issue. When you include a snippet it's aware of your template context, but when you render a snippet it's only aware of any data you pass to it or that is included in the snippet already.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants