<p>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.</p>
<p>I access the text input like this which works:</p>
<pre><code>{% for block in specialHours.specialHours %}

&lt;h2&gt;{{ block.heading }}&lt;/h2&gt;

{% endfor %}
</code></pre>
<p>What I don't understand is how to loop through the store hours days.  This is not working:</p>
<pre><code>{% for day in block.specialHours %}
&lt;tr&gt;&lt;td&gt; &lt;strong&gt;{{ day.name }}&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;{% if day.isBlank %}
                Closed
            {% else %}
                {{ day.open|time('ga') }} - {{ day.close|time('ga') }}
            {% endif %}&lt;/td&gt;&lt;/tr&gt;
</code></pre>
<p>Any ideas?  Thank you!</p>

CC BY-SA 4.0
2020-09-30T15:25:37.487Z
Does anyone have any ideas on this?  Need to figure out if store hours is going to work inside a Matrix field. Thanks!
fodney
CC BY-SA 4.0
2020-10-02T16:01:16.340Z
Last try.  Anyone have any ideas?
fodney
<matrix>
Store Hours field in Matrix
# Store Hours field in Matrix

(Asked by: username_0 on 2020-09-25)

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

{{ block.heading }}

{% endfor %}

What I don't understand is how to loop through the store hours days.  This is not working:
{% for day in block.specialHours %}
 {{ day.name }} {% if day.isBlank %}
                Closed
            {% else %}
                {{ day.open|time('ga') }} - {{ day.close|time('ga') }}
            {% endif %}

Any ideas?  Thank you!

**Tags:** matrix

> **Comments:**
> **username_0**: Does anyone have any ideas on this?  Need to figure out if store hours is going to work inside a Matrix field. Thanks!  
> **username_0**: Last try.  Anyone have any ideas?  

---

## 0 answers

