Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here: TYPO3 ELTS.
Format.nl2br ViewHelper <f:format.nl2br>
Wrapper for PHPs nl2br
function.
See https://www.php.net/manual/function.nl2br.php.
Examples
Default
<f:format.nl2br>{text_with_linebreaks}</f:format.nl2br>
Copied!
Text with line breaks replaced by <br />
Inline notation
{text_with_linebreaks -> f:format.nl2br()}
Copied!
Text with line breaks replaced by <br />
Source code
Go to the source code of this ViewHelper: Nl2brViewHelper.php (GitHub).
Arguments
The following arguments are available for <f:
:
value
-
- Type
- string
String to format