[TYPO3-english] Crop and html tags

Gregory Loichot gloichot at cross-systems.ch
Mon Jan 7 13:52:47 CET 2013


Hello,

I'm using TYPO3 4.5 and ttnews. On some pages, I need to display my news 
in list mode and crop text after n char.

So, in my TS configuration, I have:

plugin.tt_news.displayList.content_stdWrap {
    crop = 5| ... | 1
}

That works perfectly for plain text: "aaaaaa" becomes "aaa...". But if 
there are some html tags "<b>aaaaa</b>" becomes "<b>aa" and so I have a 
syntax error in the frontend page.

A solution would be:

plugin.tt_news.displayList.content_stdWrap {
    crop = 5| ... | 1
    stripHtml = 1
}

but remove all format.

Do you have any other suggestions?

Thanks.
Greg


More information about the TYPO3-english mailing list