Description page attribute

Permalink
I noticed that when you have multiple paragraphs or line breaks in a page description attribute it doesn't preserve any of the formatting when used with the page list (its just one giant paragraph). Is it possible to have the description use some paragraph or line break html tags?

hursey013
 
hursey013 replied on at Permalink Best Answer Reply
hursey013
Here's what I came up with that works, let me know if this is a poor way of doing it...
$description = nl2br($c->getCollectionDescription());
zoinks replied on at Permalink Reply
How does this solve the problem?
hursey013 replied on at Permalink Reply
hursey013
It converts plain text line breaks into HTML <br /> tags.
zoinks replied on at Permalink Reply
thanks. I had to figure out where to put it on the latest pagelist view.php... I changed lines 26-32:

<?php  
      if(!$controller->truncateSummaries){
         //nl2br preserves the line breaks  
         echo nl2br($cobj->getCollectionDescription());
      }else{
         //nl2br preserves the line breaks  
         echo nl2br($textHelper->shorten($cobj->getCollectionDescription(),$controller->truncateChars));
      }
      ?>
TravelNet replied on at Permalink Reply
Does anyone have a solution for this for 5.6.3.1 or newer?