gtonti Posted June 29, 2012 Share Posted June 29, 2012 How can I modify this: {$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'} in order to have a codition like this (from PHP) echo nl2br($product.description_short) Link to comment Share on other sites More sharing options...
Dh42 Posted June 29, 2012 Share Posted June 29, 2012 You have to turn php on in smarty, then you have to wrap your php in {PHP} php code {/PHP} but this is a security risk, so it is not advised. Link to comment Share on other sites More sharing options...
gtonti Posted June 29, 2012 Author Share Posted June 29, 2012 In smarty the same command is |nl2br| but it seems not work Link to comment Share on other sites More sharing options...
gtonti Posted June 29, 2012 Author Share Posted June 29, 2012 solved. the syntax is the following: {$product.description_short|nl2br:'UTF-8'} Link to comment Share on other sites More sharing options...
Recommended Posts