-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
The link is printing whether or not there is another in the link field.
In paragraph--localgov-call-out-box.html.twig the localgov_button needs an if statement.
The link field is not required.
<div class="call-out-box__content">
{% if heading['#context']['text'] %}
{{ heading }}
{% endif %}
{{ content|without('localgov_button', 'localgov_background_image', 'localgov_colour_theme', 'localgov_header_text', 'localgov_heading_level', 'localgov_opens_in_a_new_window') }}
<a href="{{ button_url }}" class="call-out-box__link"
{% if open_in_new_window %} target="_blank" {% endif %}>
<span>{{ paragraph.localgov_button.getValue[0].title }}</span>
{% if open_in_new_window %}
<span class="visually-hidden"> {{ '(opens in a new window)'|t }}</span>
{% endif %}
</a>
</div>
Metadata
Metadata
Assignees
Labels
No labels