App reviews, troubleshooting, and recommendations
I'm trying to create a link to the app settings within a Shopify block using schema in Liquid. I want to include dynamic variables like shop.domain and block.id in the URL.
Here’s my code:
{% schema %} { "name": "block", "target": "body", "settings": [ { "type": "header", "content": "Customize [App Configuration Page](https://admin.shopify.com/store/{{ shop.domain }}/apps/myapp/{{ block.id }})" } ] } {% endschema %}
However, the variables {{ shop.domain }} and {{ block.id }} are not being parsed within the schema. The link displays as plain text rather than dynamically replacing these variables.
Is there a way to include dynamic variables in the link within the Shopify block schema? If not, are there any recommended workarounds for creating dynamic links in Shopify blocks?
Hey @greg11223
Shopify's schema JSON section doesn’t support Liquid templating directly, which is why your variables like {{ shop.domain }} and {{ block.id }} aren’t being parsed. Liquid variables can only be used in the main Liquid template outside the JSON schema.
Here's how you can structure it:
{% assign app_link = "https://admin.shopify.com/store/" | append: shop.domain | append: "/apps/myapp/" | append: block.id %}
<div>
<h2>Customize App Configuration</h2>
<p><a href="{{ app_link }}" target="_blank">Go to App Configuration Page</a></p>
</div>
{% schema %}
{
"name": "block",
"target": "body",
"settings": [
{
"type": "header",
"content": "Customize the App Configuration from your Shopify Admin."
}
]
}
{% endschema %}
This approach will create a clickable, dynamic link that takes users to the app configuration page while displaying the section header within the schema.
Best Regards,
Moeed
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025