Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace include tag with render #43

Open
lspilker opened this issue Jul 19, 2022 · 3 comments
Open

Replace include tag with render #43

lspilker opened this issue Jul 19, 2022 · 3 comments

Comments

@lspilker
Copy link

Hi, thank you for providing the datalayer implementation and excellent instructions on how to install it. I noticed that inserting the liquid snippet in theme.liquid you used {% include 'dataLayer-allPages' %}. I had to change the include tag to render in order to make it work since Shopify depreciated the include tag.

Thank you!

@mohamedhassank20
Copy link

could you please explain how you did it

@Sky-bits
Copy link

Sky-bits commented Sep 16, 2022

{%- render 'dataLayer-allPages' -%}

YOU CAN DO THIS WAY
@lspilker @mohamedhassank20

@Brendonwbrown
Copy link

Render is new to Shopify liquid spec, but include should still be supported to my knowledge.

The previous commenter's code is includes an extra single quote. Please use this:
{% render 'dataLayer-allPages' %}

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

No branches or pull requests

4 participants