TransWikia.com

Store Hours field in Matrix

Craft CMS Asked by fodney on May 15, 2021

I’m using the Store Hours plugin inside of a Matrix field along with a text input field. The global is called specialHours and the matrix has the same name.

I access the text input like this which works:

{% for block in specialHours.specialHours %}

<h2>{{ block.heading }}</h2>

{% endfor %}

What I don’t understand is how to loop through the store hours days. This is not working:

{% for day in block.specialHours %}
<tr><td> <strong>{{ day.name }}</strong> </td><td>{% if day.isBlank %}
                Closed
            {% else %}
                {{ day.open|time('ga') }} - {{ day.close|time('ga') }}
            {% endif %}</td></tr>

Any ideas? Thank you!

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP