Use normal node template variables; simplify

This commit is contained in:
benjamin melançon 2018-11-17 00:19:36 -05:00
parent bd90d6ed14
commit a9cbf00dcf

View file

@ -70,10 +70,7 @@
* in different view modes.
*/
#}
{% if content %}
{% set bundle = content['#node'].bundle %}
{% set classes = [ 'hero', 'hero-' ~ bundle|replace({"_": "-"}) ] %}
{% set classes = [ 'hero', 'hero-' ~ node.bundle|replace({"_": "-"}) ] %}
{# expected if statement would start here #}
{% set classes = classes|merge(['is-dark']) %}
@ -94,7 +91,7 @@
{# Header hero region #}
<div class="container">
<div class="titlebar">
{{ content.title }}
{{ label }}
</div>
</div>
</section>
@ -142,5 +139,3 @@
</div>
</div>
</section>
{% endif %}