Looping Entries in Super Table, display row details I have a Super Tables field, containing related entries:



I'd like to display the field name (ie 'English Links') in a template, but can't figure out how, the following outputs a string of values and if I try to add a handle to the row output I get 'Impossible to access an attribute ("handle") on a string variable'.

{% for row in entry.relatedArticleLinks %}
    {{ row }}
{% endfor %}


I really don't think this was written very well in the first place tbh, as the rows are hard coded:

        &lt;div class="w-full md:w-1/3 my-1"&gt;
            &lt;h3&gt;English&lt;/h3&gt;
            &lt;ul class="list-reset"&gt;
            {% for link in entry.relatedArticleLinks.englishLinks %}
                &lt;li&gt;&lt;a href="{{ link.url }}" class="text-black text-sm"&gt;{{ link.title }}&lt;/a&gt;&lt;/li&gt;    
            {% endfor %}
            &lt;/ul&gt;
        &lt;/div&gt;


I'm sure there's a better way of displaying this field which would allow new rows to be displayed automatically?
This can be done, but it does require additional calls to query this information. It might be more efficient to hard-code this text in your template, unless you really want to make this text dynamic.

There's two concepts here. When you call entry.relatedArticleLinks you're fetching Super Table blocks that are related to the entry in question. Calling englishLinks on each of these blocks will return the content for this field - nothing about the field definition itself, such as the handle, name, or settings - just the content. 

What type of field is englishLinks?

If you wanted to grab the field definition as well, you can by calling:

{% set field = craft.app.fields.getFieldByHandle('relatedArticleLinks') %}
{% set blocks = craft.superTable.getSuperTableBlocks(field.id) %}
{% set fields = blocks[0].getFields() %}

{{ fields.englishLinks.name }}