I am trying to use metaobject data in the richtext of my theme app extension settings but I am getting the error:
Invalid tag 'schema': settings: Setting 'copy' can't include
Liquid syntax ('{{', '}}', '{%' or '%}') without valid dynamic sources.
The only reason I am asking if this is possible is because I am able to add the dynamic source data to the richtext field on the front end. I would like it to be in the settings so it is automatically there when my customer loads the theme app block.
here is the documentation of how to set it up in the theme editor - Input settings
Below is how my code is set up right now in case that helps you understand how to fix it.
<div class="giftCard-content">
{{ block.settings.copy }}
</div>
{% style %}
.giftCard-content {
color: {{ block.settings.color }};
font: inherit;
font-size: inherit;
font-weight: 700;
margin: 0px;
}
.giftCard-content {
display: flex;
align-items: center;
justify-content: center;
background-color: {{ block.settings.background_color }};
border-radius: 4px;
border: 1px dashed {{ block.settings.border_color }};
padding: 10px;
}
{% endstyle %}
{% schema %}
{
"name": "iziGift",
"target": "section",
"javascript": "gift.js",
"enabled_on": {
"templates": ["*"]
},
"settings": [
{ "label": "Color", "id": "color", "type": "color", "default": "#000000" },
{ "label": "Metaobject Info", "id": "metaobject_info", "type": "metaobject", "metaobject_type": "app--6930345--izigift_storefront_campaign" },
{ "label": "Background Color", "id": "background_color", "type": "color", "default": "#D4D4D4" },
{ "label": "Copy", "id": "copy", "type": "richtext", "default": "<p>Spend or more to get {{ block.settings.info.value }}</p>" },
{ "label": "Border Color", "id": "border_color", "type": "color", "default": "#000000" }
]
}
{% endschema %}