Question

How to render a url as hyper link with typoscript?

Typoscript:

    20 = TEXT
    20.field = email
    20.Wrap = <span><a href="mailto: | " >Link text</a></span>

Above typoscript gives me the HTML output

    <a href="mailto:email" >Link text</a>

I want email it self in the place of Link text. How to achieve this?

Was it helpful?

Solution

Problem solved myself... :)

    20 = TEXT
    20.dataWrap = <span><a href="mailto:{field:email}" >{field:email}</a></span>

OTHER TIPS

20 = TEXT
20.typolink.parameter.field = email

This code will wrap your field with the standard typolink function. If an "@" is found, typo3 will wrap it as an email-address.

This solution will parse your address with the useful typo3 spam email protection

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top