Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi, I want to check if I'm inside the dev or prod environment within Liquid.
1. attempt
I found a .env file, but I don't know how to read the variables that are inside the .env within Liquid.
2. attempt
I added new settings to the settings_data.json but I don't know where these settings should appear. I don't find them inside my admin backend
This is my JSON
```json
I hope i understood your issue, you need to know either your are in the Theme Editor or in the actual website it self?
Use the Shopify.designMode in JS and request.design_mode in Liquid.
Check this link from Shopify's team:
https://shopify.dev/changelog/detect-the-theme-editor-using-liquid-and-javascript
Hope it helped.
DEVELOPMENT = SANDBOX, PRODUCTION = LIVE
If `DesignMode` = true, your shop is being EDITED, totally different thing from sandbox and live
did you managed to find a solution?
I saw usages of `theme.role` Liquid variable to determine if the theme is in developement or prod.
Not sure if that corresponds to the store being in dev or prod.
Hmm interesting, it could be repurposed as dev vs prod
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024