How To Enable App Block To Show Dependent On Metafield?

HarryKane111
Shopify Partner
1 0 0

 

How To Enable App Block To Show Dependent On Metafield?

Such as using app-owned data:

 

 

{% schema %}
{
  "name": "Stories",
  "target": "section",
  "enabled_on": {
      "templates":  {{ app.metafields.stories.templates }}
   },
  "settings": [
    {
      "type": "textarea",
      "id": "debugging_script",
      "label": "Debugging Script: (For Developers)",
      "default": "Debugging Script: (For Developers)"
    }
  ]
}
{% endschema %}

 

 

Does anyone have any ideas?
 
 
Reply 1 (1)

Liam
Shopify Staff
2731 302 779

Hi HarryKane111,

 

Just to confirm, you'd like the app block above to only be displayed (or addable) on pages that have a specific metafield associated with them? 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog