Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {# Check if this is the front/homepage #}
- {% if fn('is_front_page') %}
- {# store our hero data #}
- {% set image = hero_random_img.url %}
- {% set title = hero_random_copy %}
- {% set link = hero_random_link.url %}
- {% set link_title = hero_random_link.title %}
- {% set link_target = hero_random_link.target %}
- {% set alignment = hero_random_alignment %}
- {% set class = 'hero-bg-image--homepage' %}
- {% else %}
- {# All other pages get the normal treatment #}
- {% set image = post.thumbnail.src %}
- {% set title = post.title %}
- {% endif %}
- {# Feed data into template in Pattern Lab #}
- {% include '@components/hero-bg-image/hero-bg-image.twig' with {
- 'custom_classes': class,
- 'image': image,
- 'image_alt': '',
- 'has_overlay': true,
- 'title': title,
- 'subtitle': '',
- 'summary': '',
- 'call_to_action_content': ''
- } %}
Add Comment
Please, Sign In to add comment