Hello all, I am working on a block to add to my theme footer but I need help to understand why this html dt tag does not render on my Shopify theme?
<dt>{{ block.settings.main-phone.label }}</dt>
Here are the lines of code from my footer.liquid file. The main-address-label & main-address renders but I had to repeat myself by “duplicating” all the code from main-address to main-address-label.
<dl>
<dt>{{ block.settings.main-address-label }}</dt>
<dd>{{ block.settings.main-address }}</dd>
<dt>{{ block.settings.main-phone.label }}</dt>
<dd><a href="tel:{{ block.settings.main-phone }}">{{ block.settings.main-phone }}</a></dd>
</dl>
{% schema %}
{
"type": "captiond",
"name": "t:sections.footer.blocks.captiond.name",
"settings": [
{
"type": "text",
"id": "heading",
"default": "Contact",
"label": "t:sections.footer.blocks.captiond.settings.heading.label"
},
{
"type": "text",
"id": "main-address-label",
"default": "Main Address",
"label": "t:sections.footer.blocks.captiond.settings.main-address-label.label"
},
{
"type": "richtext",
"id": "main-address",
"default": "<p>Lorem</p>",
"label": "t:sections.footer.blocks.captiond.settings.main-address.label"
},
{
"type": "text",
"id": "main-phone",
"default": "+333333333333",
"label": "t:sections.footer.blocks.captiond.settings.main-phone.label"
},
]
}
Code lines from the file en.default.schema.json
...
"captiond": {
"name": "Contacts",
"settings": {
"heading": {
"label": "Contacts"
},
"main-address-label": {
"label": "Pick a label for the address"
},
"main-address": {
"label": "Main Address"
},
"main-phone": {
"label": "Main Phone"
}
}
}