-
In Shopify's Liquid files, some default configuration items are read from the default values in the {% schema %}...{% endschema %} section at the end of the file, but the tag parsing is done in order. When the registered schema tag is called, the previous value-fetching process has already ended. So is there a way to specify that the schema I registered is executed first? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Not possible as the parsing is one time process apart from recursions. |
Beta Was this translation helpful? Give feedback.
"Thank you, I have solved it. After calling parseFile, I obtained a token with the name 'schema'. Since the content in schema is generally a JSON-compliant object, I just need to extract the content from schema, then use JSON.parse on it, and finally put it into the context for rendering."