Is there an easy way to return the total number of entries in a Super Table within a Matrix field?
You mean how many rows the table has?
{{ matrixblock.superTableFieldHandle|length }}
Or the number of blocks of a matrix field?
{{ parent.matrixFieldHandle|length }}
To get the number of blocks for each row
{% for row in entry.superTableMatrix %}
{{ row.matrix|length %}
{% endfor %}
-
Is there anyway to get all the records listed in the SuperTable across each Matrix entry within the Entry. I am not sure if I am saying that correct. Basically I have 4 matrix records and within one of the matrix blocks there is a SuperTable and there would be 5-100 records in thost SuperTables. So combined could be 20-400 lines since the SuperTable is a text field. – Vin Apr 23 '18 at 22:37
-
Basically need the total count for all those SuperTable entries for each Entry. – Vin Apr 23 '18 at 22:38
-
1You can loop through each field and add the number for each element – Robin Schambach Apr 23 '18 at 22:40