grid_row
The grid_row
object cannot be invoked on its own. It must be invoked inside a custom page.
It contains following attributes:
Object Fields
Field | Data Type | Description |
---|---|---|
grid_row.id | Number | Returns id of the grid row. |
grid_row.items | Array | Returns an array of grid_items in the row. |
grid_row.full_width | Boolean | Returns true if the row should be displayed in full width. |
grid_row.remove_padding | Boolean | Returns true if the row is set to remove surrounding padding. |
範例
{% for item in row.items %}
<div id="page-item-{{item.id}}" class="grid-{{item.type}}-item">
{% grid_item_block %}{% end_grid_item_block %}
{% unless item.hide_title or row.full_width %}
<div>
{{ item.title }}
</div>
{% endunless %}
{% unless item.hide_description or row.full_width %}
<div>
{{ item.content }}
</div>
{% endunless %}
</div>
{% endfor %}
Updated about 1 year ago