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