-
-
Notifications
You must be signed in to change notification settings - Fork 323
/
OneImage.html.twig
32 lines (29 loc) · 1.09 KB
/
OneImage.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{#
Media Slider with BxSlider
Variables that are available:
- {{ mediaItem }}: Contains the MediaItem
- {{ title }}: A custom optional title that you can give when parsing from Custom module.
#}
{% if mediaItem %}
<section class="module-media-library widget-media-library-one-image" itemscope itemtype="http://schema.org/ImageGallery">
{% block widget_heading %}
{% if title %}
<header class="widget-heading">
<h3>{{ title|ucfirst }}</h3>
</header>
{% endif %}
{% endblock %}
{% block widget_body %}
<div class="widget-body">
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
{% if mediaItem.type == 'movie' %}
{{ mediaItem.getIncludeHTML()|raw }}
{% else %}
<img itemprop="thumbnail" class="img-polaroid img-responsive" src="{{ (mediaItem.getWebPath('media_library_one_image_large')) }}" alt="{{ mediaItem.title }}" />
{% endif %}
</figure>
</div>
{% endblock %}
{% block widget_footer %}{% endblock %}
</section>
{% endif %}