shopify-shortcodes icon indicating copy to clipboard operation
shopify-shortcodes copied to clipboard

Include deprecated, render replacement no longer works

Open dpitmedia opened this issue 4 years ago • 2 comments

When we update to the new render call, we see an error on all embedded content: include usage is not allowed in this context.

Per Shopify:

This is happening because there are some liquid "includes" used within the new "render" liquid tags. The liquid {% include %} tag has been deprecated, and replaced by the {% render %} tag. These tags are used to include snippets in your theme (such as snippets from 3rd party app code). The solution to this is to replace the use of {% include 'snippet-name' %} with {% render 'snippet-name' %} when {% include %} has been added in.

It looks like if I change the call for {% include 'shortcode' load: page.content %} to {% render 'shortcode' load: page.content %}, it does not work. Changing it back to include works again. Is there an updated way we should do this but using render?

dpitmedia avatar Jul 10 '20 04:07 dpitmedia

It sounds like variables need to passed into the render tag, which is why it's not working. Is there any way to update the code for the correct render tags?

dpitmedia avatar Jul 15 '20 14:07 dpitmedia

any update?

sadewadee avatar Jun 10 '24 15:06 sadewadee