Over the past year I’ve seen ‘render’ pop-up in liquid but haven’t taken any notice of but I’ve than ‘include’ is now depreciated so I have a couple of questions.
How long will ‘include’ work for before I begins to break websites?
And I have many multi-regional clients with stores for USA, EU, Australia etc so I often have a ‘if-store.liquid’ snippet which I use to define global variables eg.
This is so I can drop it into various templates and sections with an include tag but render will obviously break this functionality, so I wonder if there is a better/alternative way I should be doing this in the future?
When/if ‘include’ is removed there will be no way to achieve this so it would be great if there was a way to export or use a variable outside of a render tag.
Maybe this isn’t an widely discussed issue yet because we can still use include but I’d like to find a solution to this and start transitioning to render before its too late.
I totally agree with you. I have a use case for using a variable defined in a snippet. I decided to stick with include until it’s fully sunset. For now I couldn’t find a way with render.