[TYPO3-ttnews] preserve linebreaks in db when using textbox

Stefan Kaufmann kaufmann at dwwd.ch
Sun Jan 7 13:49:20 CET 2007


Hi,

I resolved the problem. With the php function nl2br it worked. My code 
in the class file class.tx_ttnews.php in pi1 looks as follows:

$markerArray['###MISCELLANIOUS###'] = nl2br 
($this->local_cObj->stdWrap($row['tx_ttnewsaddfields_miscellanious'], 
$lConf['tx_ttnewsaddfields_miscellanious_stdWrap.']));

Hope it helps someone.
Stefan Kaufmann

Stefan Kaufmann wrote:
> Hello,
> 
> I am using a normal textbox for some fields in tt_news and I would like 
> that linebreaks (when pressing ENTER) are preserved in database and 
> displayed when viewing the article. Unfortunately this is not the case.
> It seems the linebreaks are saved in database but when viewing the 
> article in the frontend the linebreaks are gone and text appears without 
> break. How can I tell tt_news or typo3 to change this behaviour?
> Thanks for your help.
> Stefan Kaufmann


More information about the TYPO3-project-tt-news mailing list