Hi,
I'm using a table field, as per the docs, with a first_row_headers
toggle. I was wondering if it is possible to loop those first row headers over my td
tags as data attributes. The aim is to be able to break the table rows into blocks on mobile, showing data attributes with my header content on the td
s.
I can't figure out how to achieve this, below is how it should output for each tr
:
<tr>
<td data-title="[ first row header title one here ]">{{ value|markdown }}</td>
<td data-title="[ first row header title two here ]">{{ value|markdown }}</td>
<td data-title="[ first row header title three here ]">{{ value|markdown }}</td>
<td data-title="[ first row header title four here ]">{{ value|markdown }}</td>
<td data-title="[ first row header title five here ]">{{ value|markdown }}</td>
</tr>
Thanks for any help!