[英]EXT:tt_news <link> in RSS feed
I'm trying to set up an RSS Feed through tt_news in TYPO3: http://www.familieistzukunft.ch/home/?type=100 我正在尝试通过TYPO3中的tt_news设置RSS Feed: http : //www.familieistzukunft.ch/home/? type = 100
The links in the RSS feed are not proper HTML. RSS源中的链接不是正确的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? 那么为什么CDATA标签无济于事呢? How do I fix this?
我该如何解决?
This is my TypoScript: 这是我的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">
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
. 这个想法是相同的,但使用
content_stdWrap
而不是bodytext_stdWrap
。 In my case I got problem using htmlSpecialChars.preserveEntities = 1
. 在我的情况下,我遇到问题使用
htmlSpecialChars.preserveEntities = 1
。
It looks, like you are just putting raw content from DB to ###NEWS_CONTENT### marker. 看起来,就像您只是将DB中的原始内容放到### NEWS_CONTENT ###标记中一样。
You should use pi_RTEcssText($rawContent);
你应该使用
pi_RTEcssText($rawContent);
from tslib_pibase
class to convert all the raw content to proper HTML. 从
tslib_pibase
类将所有原始内容转换为正确的HTML。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.