<p>Your Super Table field is probably configured as a static field.</p>

<p>Have a look at the documentation for how to access subfields in this case:  <a href="https://verbb.io/craft-plugins/super-table/docs/guides/templating-examples#static-super-table-field" rel="nofollow noreferrer">https://verbb.io/craft-plugins/super-table/docs/guides/templating-examples#static-super-table-field</a></p>

<p>So instead of the for-loop you’d have sth. like this: <code>{{ block.package.packageName }}</code></p>

CC BY-SA 3.0
2017-10-13T15:34:58.587Z
Brilliant!  That's done it - phew :/
Martin
CC BY-SA 3.0
2017-10-13T11:40:54.147Z
2017-10-24T09:59:11.133Z
2017-10-24T09:59:11.133Z
carlcs
<p>Having looked at other answers I'm pretty sure I've got this correct but it's still not working for me.  I've stripped the code down to make it easier to read.</p>

<p>Error i'm getting is "Impossible to access an attribute ("packageName") on a string variable ("40")."  This error repeats for packageTitle, packageShortIntro etc if I delete the packageName line etc..</p>

<p>All other fields, 'block.body', 'block.subTitle' are coming through fine.</p>

<p>Also please note there is also a Table field within the SuperTable.</p>

<pre><code>{% for block in entry.pageContent %}
    {% switch block.type %}

        {% case 'bodyText' %}
            {{ block.body }}

        {% case 'packages' %}
            &lt;!-- Supertable --&gt;
            {% for row in block.package %}
                {{ row.packageName }}
                {{ row.packageTitle }}
                {{ row.packageShortIntro }}

                {% for items in row.itemsAvailable %}
                    {{ items.item }}
                    {{ items.isAvailable }}
                {% endfor %}

                {{ row.packageCost }}
            {% endfor %}
            &lt;!-- End Supertable --&gt;

        {% case 'subTitle' %}
            {{ block.subTitle }}

    {% endswitch %}
{% endfor %}
</code></pre>

<p>Many thanks for looking and any advice you can offer.</p>

CC BY-SA 3.0
2017-10-13T09:44:01.710Z
You normally need a `.first()` added somewhere when you get that warning I believe. However, I'd recommend commenting out all of the individual field lines in your supertable code, and going line by line to find the issue.
mention79
CC BY-SA 3.0
2017-10-13T10:48:29.943Z
Hi, thanks but I tried .first() and also commenting out code.
Martin
<matrix><plugin-supertable>
Output SuperTable fields from inside Matrix field
# Output SuperTable fields from inside Matrix field

(Asked by: username_0 on 2017-10-13)

Having looked at other answers I'm pretty sure I've got this correct but it's still not working for me.  I've stripped the code down to make it easier to read.
Error i'm getting is "Impossible to access an attribute ("packageName") on a string variable ("40")."  This error repeats for packageTitle, packageShortIntro etc if I delete the packageName line etc..
All other fields, 'block.body', 'block.subTitle' are coming through fine.
Also please note there is also a Table field within the SuperTable.
{% for block in entry.pageContent %}
    {% switch block.type %}

        {% case 'bodyText' %}
            {{ block.body }}

        {% case 'packages' %}
            
            {% for row in block.package %}
                {{ row.packageName }}
                {{ row.packageTitle }}
                {{ row.packageShortIntro }}

                {% for items in row.itemsAvailable %}
                    {{ items.item }}
                    {{ items.isAvailable }}
                {% endfor %}

                {{ row.packageCost }}
            {% endfor %}
            

        {% case 'subTitle' %}
            {{ block.subTitle }}

    {% endswitch %}
{% endfor %}

Many thanks for looking and any advice you can offer.

**Tags:** matrix, plugin-supertable
> **Comments:**
> **username_1**: You normally need a `.first()` added somewhere when you get that warning I believe. However, I'd recommend commenting out all of the individual field lines in your supertable code, and going line by line to find the issue.  
> **username_0**: Hi, thanks but I tried .first() and also commenting out code.  

---

## 1 answers

### Answer by username_2 on 2017-10-13. Score: 0 | Accepted answer

Your Super Table field is probably configured as a static field.

Have a look at the documentation for how to access subfields in this case: <https://verbb.io/craft-plugins/super-table/docs/guides/templating-examples#static-super-table-field>

So instead of the for-loop you’d have sth. like this: `{{ block.package.packageName }}`

> **Comments:**
> **username_0**: Brilliant!  That's done it - phew :/  

---

