views-bootstrap-media-object.html.twig in Views Bootstrap 8.3
{# @TODO: How to remove bootstrap theme's default .img-responsive class on image fields, which doesn't work with .media-left, etc. For now, I'm using .pull-left as a fix. #}
<div id="{{ id }}" {{ attributes.addClass(classes) }}>
{% for row in rows -%}
<div class="media">
{% if image_class == "media-left" %}
<div class="pull-left">
{{ row.image }}
</div>
{% endif %}
{% if image_class == "media-middle" %}
<div class="media-middle">
{{ row.image }}
</div>
{% endif %}
<div class="media-body">
{% if row.heading %}
<h3 class="media-heading">
{{ row.heading }}
</h3>
{% endif %}
{% if row.body %}
{{ row.body }}
{% endif %}
{% if image_class == "media-right" %}
<div class="pull-right">
{{ row.image }}
</div>
{% endif %}
</div>
</div>
{%- endfor %}
</div>
File
templates/views-bootstrap-media-object.html.twig
View source
- {# @TODO: How to remove bootstrap theme's default .img-responsive class on image fields, which doesn't work with .media-left, etc. For now, I'm using .pull-left as a fix. #}
- <div id="{{ id }}" {{ attributes.addClass(classes) }}>
- {% for row in rows -%}
- <div class="media">
-
- {% if image_class == "media-left" %}
- <div class="pull-left">
- {{ row.image }}
- </div>
- {% endif %}
-
- {% if image_class == "media-middle" %}
- <div class="media-middle">
- {{ row.image }}
- </div>
- {% endif %}
-
- <div class="media-body">
- {% if row.heading %}
- <h3 class="media-heading">
- {{ row.heading }}
- </h3>
- {% endif %}
- {% if row.body %}
- {{ row.body }}
- {% endif %}
-
- {% if image_class == "media-right" %}
- <div class="pull-right">
- {{ row.image }}
- </div>
- {% endif %}
-
- </div>
- </div>
- {%- endfor %}
- </div>
-