Snippets and Section Schema

Highlighted
Shopify Partner
4 0 0

I'm looking for a way to create a common JSON schema object to share across multiple sections.

 

Things I have tried:

  • Creating a snippet with the "{% schema %} ... json markup ... {% endschema %}" in it but that's not valid.
  • Create a snippet with just the json markup in it. And then within the section having something like:
    "{% schema %} {% include 'snippet-schema-json' %} {% endschema %}"
    But that is also invalid.
  • Using metafields to store the global scheme object and print onto the page. This didn't cause any errors, but all it did was print the text to the page instead of actually registering the section schema fields

 

Is it possible to have schema managed from a central location and used in multiple sections?

"Let's Build Something Great, Together"
Minneapolis, MN
0 Likes