[TYPO3-ttnews] tt_news in List Mode : the teaser keeps <p> tag
Oliver Rowlands
oliver at liquidlight.co.uk
Sun Nov 25 13:29:39 CET 2007
Hi Silithlas,
For some unknown reason sub-headers in tt_news have two differnt
stdWraps applied to them.
The first stdWrap 'plugin.tt_news.displayXXX.subheader_stdWrap' actually
strips out all of the HTML (including the <p> elements) which is the
desired affect.
Unfortunately the whole sub-header is then wrapped again in the global
tt_news stdWrap 'plugin.tt_news.general_stdWrap' which then converts all
of the newlines back into paragraphs.
There are three solutions to this problem:
1) Proper solution: Extend tt_news and override the ###NEWS_SUBHEADER###
marker by using the 'extraItemMarkerProcessor' hook.
2) Dirty hack: in the 'tt_news/pi/class.tx_ttnews.php' file change the line:
$markerArray['###NEWS_SUBHEADER###'] =
$this->formatStr($this->local_cObj->stdWrap($row['short'],
$lConf['subheader_stdWrap.']));
to
$markerArray['###NEWS_SUBHEADER###'] =
$this->local_cObj->stdWrap($row['short'], $lConf['subheader_stdWrap.']);
3) You could, if you really wanted to, disable the global stdWrap.
However be aware that this will have undesirable side effects as it will
affect all of the HTML content output by tt_news:
plugin.tt_news.general_stdWrap.parseFunc =
Hope this helps,
Oliver
Silithlas wrote:
> Hi,
>
> I think there is a problem in ListView of tt_news. tt_news strip all
> html tags, EXCEPT the <p> tag, so some line breaks remains.
>
> Any way to remove <p> tags as well?
>
> And, there is another issue, tt_news just removes <br /> tags. Perhaps
> would be better instead to replace them by space character, because by
> just removing the tags, we have some words that stick one to another
> without any space between.
>
> Thanks
--
Oliver Rowlands
:: Liquid Light ::
E - oliver at liquidlight.co.uk
W - http://www.liquidlight.co.uk
T - 00 44 (0)845 6 58 88 35
F - 00 44 (0)845 6 58 44 35
More information about the TYPO3-project-tt-news
mailing list