It is possible to use Liquidjs generate variable and use it in Shopify Liquid? #319
johnliu-code
started this conversation in
Working with Shopify
Replies: 1 comment 2 replies
-
Here is something I have tried in Liquidjs Demo: It works, but how can I bring this code into Shopify? Or if it is possible to do this in Shopify? Thanks! const template = document.querySelector('[type="text/template"]') const screenAvailWidth = window.screen.availWidth; engine Screen Width = {{ screen_size }} px. {% else %} {% endif %} </script> |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am new to liquid and seeing the way to check screen size and make a condition for upload different images.
But we could not call any JS variable to Liquid.
When I did research and find Liquidjs.
So, I am wondering if we could use Liquidjs to create a variable and use it in Shopify Liquid conditions?
I have tried to figure it out, but did not find the way how they work together.
Could you please help me out or give me some guide?
Big thanks!
Beta Was this translation helpful? Give feedback.
All reactions