Do a sloppy override to have only class 'section' for view paragraphs

This commit is contained in:
benjamin melançon 2018-11-13 22:44:38 -05:00
parent c15eca3088
commit 17a52237be

View file

@ -0,0 +1,15 @@
{# extends 'paragraph.html.twig' #}
{%
set classes = [
'section',
not paragraph.isPublished() ? 'paragraph--unpublished'
]
%}
{% block paragraph %}
<div{{ attributes.addClass(classes) }}>
{% block content %}
{{ content }}
{% endblock %}
</div>
{% endblock paragraph %}