Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How To Enable App Block To Show Dependent On Metafield?

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
Community Manager
3108 344 892

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