2

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?

Harish Ambady
  • 12,525
  • 4
  • 29
  • 54

2 Answers2

4

Problem solved myself... :)

    20 = TEXT
    20.dataWrap = <span><a href="mailto:{field:email}" >{field:email}</a></span>
Harish Ambady
  • 12,525
  • 4
  • 29
  • 54
3
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