views-bootstrap-cards.html.twig in Views Bootstrap 8.3
Same filename and directory in other branches
views-bootstrap-cards.html.twig Default simple view template to display Bootstrap Cards.
- rows: Contains a nested array of rows. Each row contains an array of columns.
File
templates/views-bootstrap-cards.html.twigView source
- {#
- /**
- * @file views-bootstrap-cards.html.twig
- * Default simple view template to display Bootstrap Cards.
- *
- *
- * - rows: Contains a nested array of rows. Each row contains an array of
- * columns.
- *
- * @ingroup views_templates
- */
- #}
- {{ attach_library('views_bootstrap/cards') }}
- <div {{ attributes.addClass(classes) }}>
- {% for key, row in rows -%}
- <div {{ row.attributes.addClass(classes) }}>
- {# Show image #}
- {% if row.image %}
- {{ row.image }}
- {% endif %}
- {% if row.title %}
- <div class="card-header">{{ row.title }}</div>
- {% endif %}
- {% if row.content %}
- <div class="card-body">
- {{ row.content }}
- </div>
- {% endif %}
- </div>
- {%- endfor %}
- </div>