Why isn't the html dt tag rendering on my theme footer?

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"
}
}
}

Hi @fbi

This is Kate from PageFly - Landing page builder, I’d like to suggest this idea:

Your code:

<dl>
<dt>{{ block.settings.main-address-label }}</dt>
<dd>{{ block.settings.main-address }}</dd>
<dt>{{ block.settings.main-phone.label }}</dt>
<dd>{{ block.settings.main-phone }}</dd>
</dl>

You can change “block” to “section”. Same bellow code:

<dl>
<dt>{{ section.settings.main-address-label }}</dt>
<dd>{{ section.settings.main-address }}</dd>
<dt>{{ section.settings.main-phone.label }}</dt>
<dd>{{ section.settings.main-phone }}</dd>
</dl>

I hope it would help you!

Thanks, @PageFly-Kate . I read your solution but I already solved it through another way.

1 Like