4 * Theme override for views to display rows in a grid.
7 * - attributes: HTML attributes for the wrapping element.
8 * - title: The title of this group of rows.
9 * - view: The view object.
10 * - rows: The rendered view results.
11 * - options: The view plugin style options.
12 * - row_class_default: A flag indicating whether default classes should be
14 * - col_class_default: A flag indicating whether default classes should be
16 * - items: A list of grid items. Each item contains a list of rows or columns.
17 * The order in what comes first (row or column) depends on which alignment
18 * type is chosen (horizontal or vertical).
19 * - attributes: HTML attributes for each row or column.
20 * - content: A list of columns or rows. Each row or column contains:
21 * - attributes: HTML attributes for each row or column.
22 * - content: The row or column contents.
24 * @see template_preprocess_views_view_grid()
31 'cols-' ~ options.columns,
35 {% if options.row_class_default %}
39 options.alignment == 'horizontal' ? 'clearfix',
43 {% if options.col_class_default %}
47 options.alignment == 'vertical' ? 'clearfix',
54 <div{{ attributes.addClass(classes) }}>
55 {% if options.alignment == 'horizontal' %}
56 {% for row in items %}
57 <div{{ row.attributes.addClass(row_classes, options.row_class_default ? 'row-' ~ loop.index) }}>
58 {% for column in row.content %}
59 <div{{ column.attributes.addClass(col_classes, options.col_class_default ? 'col-' ~ loop.index) }}>
66 {% for column in items %}
67 <div{{ column.attributes.addClass(col_classes, options.col_class_default ? 'col-' ~ loop.index) }}>
68 {% for row in column.content %}
69 <div{{ row.attributes.addClass(row_classes, options.row_class_default ? 'row-' ~ loop.index) }}>