Twig Examples
If Coilpack is installed you can output a Simple Grid field with the following Twig variables.
{% for entry in exp.channel.entries.entry_id('1').get() %}
{% for row in entry.simple_grid %}
{# Each column in the Simple Grid field is accessible via it's short name.
In this example the Simple Grid field has 2 columns: Product and Price #}
{{ row.product }}
{{ row.price }}
{# Regardless of the column names you define, you'll also have access
to each of these variables while iterating the Grid rows #}
{{ row.count }}
{{ row.row_count }}
{{ row.row_id }}
{{ row.total_rows }}
{{ row.total_columns }}
{{ row.index }}
{{ row.row_index }}
{{ row.is_first_row }}
{{ row.is_last_row }}
{% endfor %}
{% endfor %}
Last modified 3mo ago