Reputation: 616
I'm trying to set up an RSS Feed through tt_news in TYPO3: http://www.familieistzukunft.ch/home/?type=100
The links in the RSS feed are not proper HTML. They turn up like this:
<link http://www.familieistzukunft.ch/details/...80780691f/ - external-link-new-window "Opens external link in new window">Kommentar</link>
I did the template like this:
<content:encoded> <![CDATA[###NEWS_CONTENT###]]> </content:encoded>
So why does the CDATA tag not help? How do I fix this?
This is my TypoScript:
# RSS2
rss2 = PAGE
rss2 {
typeNum = 100
10 >
10 < plugin.tt_news
10.pid_list >
10.pid_list = {$plugin.tt_news.pid_list}
10.singlePid = {$plugin.tt_news.singlePid}
10.defaultCode = XML
10.displayXML.xmlFormat = rss2
#wenn man archivierte News nicht mehr RSSen will
10.archive = -1
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:text/xml
no_cache = 1
xhtml_cleaning = 0
}
}
#RSS 0.91
rss091 = PAGE
rss091 < rss2
rss091 {
typeNum = 101
10.displayXML.xmlFormat = rss091
}
#RDF
rdffeed = PAGE
rdffeed < rss2
rdffeed {
typeNum = 102
10.displayXML.xmlFormat = rdf
#RDF kennt auch Feed-Images
10.displayXML.xmlIcon = fileadmin/images/rdf.gif
}
#Atom
atom1 = PAGE
atom1 < rss2
atom1 {
typeNum = 103
10.displayXML.xmlFormat = atom1
}
page.headerData.110 = HTML
page.headerData.110.value = <link rel="alternate" type="application/rss+xml" title="News" href="http://www.familieistzukunft.ch/index.php?id=32&type=100">
Upvotes: 1
Views: 1167
Reputation: 41
I had the same problem and solved it with the following code:
rss.10.displayXML {
xmlFormat = rss2
content_stdWrap {
stripHtml = 0
htmlSpecialChars = 0
parseFunc < lib.parseFunc_RTE
parseFunc.nonTypoTagStdWrap.encapsLines.nonWrappedTag >
}
}
The idea is the same but use content_stdWrap
instead of bodytext_stdWrap
. In my case I got problem using htmlSpecialChars.preserveEntities = 1
.
Upvotes: 4
Reputation: 3228
It looks, like you are just putting raw content from DB to ###NEWS_CONTENT### marker.
You should use pi_RTEcssText($rawContent);
from tslib_pibase
class to convert all the raw content to proper HTML.
Upvotes: 0