← All changes
|
modules/atomic-widgets/elements/atomic-paragraph/atomic-paragraph.html.twig
+4
-2
4.0.9
→
4.0.0-beta1
View file →
| @@ -1,10 +1,12 @@ | ||
| 1 | 1 | {% if settings.paragraph is not empty %} |
| 2 | 2 | {% set id_attribute = settings._cssid is not empty ? 'id=' ~ settings._cssid | e('html_attr') : '' %} |
| 3 | 3 | <{{ settings.tag | e('html_tag') }} class="{{ settings.classes | merge( [ base_styles.base ] ) | join(' ') }}" data-interaction-id="{{ interaction_id }}" {{ id_attribute }} {{ settings.attributes | raw }}> |
| 4 | - {% if settings.link and settings.link.attributes is not empty %} | |
| 4 | + {% if settings.link.href %} | |
| 5 | 5 | <{{ settings.link.tag | e('html_tag') }} |
| 6 | - {{ settings.link.attributes | raw }} | |
| 6 | + {% set linkAttr = settings.link.tag == 'a' ? 'href' : 'data-action-link' %} | |
| 7 | + {{ linkAttr }}="{{ settings.link.href | raw }}" | |
| 8 | + target="{{ settings.link.target }}" | |
| 7 | 9 | class="{{ base_styles['link-base'] }}" |
| 8 | 10 | > |
| 9 | 11 | {{ settings.paragraph | striptags(allowed_tags) | raw }} |
| 10 | 12 | </{{ settings.link.tag | e('html_tag') }}> |