Skip to content
Umakant Patil edited this page Aug 14, 2017 · 1 revision

All "\n" line breaks will be converted to html
tags in the given variable. This is equivalent to the PHP's nl2br() function.

Template:

{$articleTitle = 'Sun or rain expected\ntoday, dark tonight'}

{$articleTitle|nl2br}

output:

Sun or rain expected<br />today, dark tonight

see also nl2br in PHP Smarty documentation.

Clone this wiki locally