Skip to content

Commit

Permalink
Render links in property macros.
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Nikolaev committed Feb 8, 2021
1 parent f62fb36 commit 6b4b4b5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,5 @@
7.3.28: Add LocaleProviderInterface::getDefaultLocale().

7.3.30: Add plain_data() macro.

7.3.32: Render links in property macros.
10 changes: 10 additions & 0 deletions Resources/views/macros.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@
style="font-family: Arial, sans-serif; font-size: 15px; line-height: 23px; color: #333333;">
{{ value }}
</a>
{% elseif '://' in value %}
<a href="{{ value }}"
style="font-family: Arial, sans-serif; font-size: 15px; line-height: 23px; color: #333333;">
{{ value }}
</a>
{% else %}
{{ value|trans|raw }}
{% endif %}
Expand Down Expand Up @@ -212,6 +217,11 @@
style="font-family: Arial, sans-serif; font-size: 15px; line-height: 23px; color: #333333;">
{{ value }}
</a>
{% elseif '://' in value %}
<a href="{{ value }}"
style="font-family: Arial, sans-serif; font-size: 15px; line-height: 23px; color: #333333;">
{{ value }}
</a>
{% else %}
{{ value|trans|raw }}
{% endif %}
Expand Down

0 comments on commit 6b4b4b5

Please sign in to comment.