Twig filter: how to set a custom link label?

Created on 3 April 2025, 3 days ago

Problem/Motivation

Using the field formater, you can set a custom link label to be used instead of the email address.

In twig, using {{ 'terry.jones@spam.com'|obfuscateMail }} renders as <a href="mailto:terry.jones@spam.com">terry.jones@spam.com</a>

Is there a way to alter the link label in order to render as <a href="mailto:terry.jones@spam.com">Send mail</a> while keeping the email address obfuscated?

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡«πŸ‡·France PhilY πŸ‡ͺπŸ‡ΊπŸ‡«πŸ‡· Paris, France

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024