Rss: Unterschied zwischen den Versionen
Aus Wikizone
| Zeile 1: | Zeile 1: | ||
Beispiel für Link im Header der Seite | Beispiel für Link im Header der Seite | ||
<link rel="alternate" type="application/rss+xml" title="t3n Magazin RSS Feed" href="http://t3n.de/magazin/feed/" /> | <link rel="alternate" type="application/rss+xml" title="t3n Magazin RSS Feed" href="http://t3n.de/magazin/feed/" /> | ||
| + | |||
| + | == RSS für TYPO3 == | ||
| + | tt_news Beiträge lassen sich sehr einfach als RSS News Feed bereitstellen. | ||
| + | |||
| + | === Quick === | ||
| + | '''Statisches Template''' | ||
| + | |||
| + | tt_news stellt ein statisches Template bereit, daß die wichtigsten Einstellungen vornimmt. Man kann natürlich auch alles selber machen. Wie unten gezeigt. Aber einfacher ist das statische. | ||
| + | |||
| + | Beispiel für eigenes TypoScript | ||
| + | <pre> | ||
| + | ### RSS ### | ||
| + | # Configure tt_news to display the xml template | ||
| + | |||
| + | plugin.tt_news { | ||
| + | displayXML { | ||
| + | # rss091_tmplFile = EXT:tt_news/res/rss_0_91.tmpl | ||
| + | # rdf_tmplFile = EXT:tt_news/res/rdf.tmpl | ||
| + | # atom03_tmplFile = EXT:tt_news/res/atom_0_3.tmpl | ||
| + | # atom1_tmplFile = EXT:tt_news/res/atom_1_0.tmpl | ||
| + | |||
| + | rss2_tmplFile = EXT:tt_news/res/rss_2.tmpl | ||
| + | # possibile values: rss091 / rss2 / rdf / atom03 / atom1 | ||
| + | xmlFormat = rss2 | ||
| + | xmlTitle = dekra-aviation: News | ||
| + | xmlLink = http://dekra-aviation.com/ | ||
| + | xmlDesc = Latest News | ||
| + | xmlLang = de | ||
| + | xmlIcon = fileadmin/tt_news_article.gif | ||
| + | title_stdWrap.htmlSpecialChars = 1 | ||
| + | title_stdWrap.htmlSpecialChars.preserveEntities = 1 | ||
| + | subheader_stdWrap.stripHtml = 1 | ||
| + | subheader_stdWrap.htmlSpecialChars = 1 | ||
| + | subheader_stdWrap.htmlSpecialChars.preserveEntities = 1 | ||
| + | subheader_stdWrap.crop = 100 | ... | 1 | ||
| + | subheader_stdWrap.ifEmpty.field = bodytext | ||
| + | xmlLastBuildDate = 1 | ||
| + | } | ||
| + | } | ||
| + | |||
| + | ## This enables the xml news feed | ||
| + | xmlnews = PAGE | ||
| + | xmlnews { | ||
| + | typeNum = 100 | ||
| + | 10 > | ||
| + | 10 < plugin.tt_news | ||
| + | 10.pid_list > | ||
| + | 10.pid_list = 322 | ||
| + | 10.singlePid = {$plugin.tt_news.singlePid} | ||
| + | 10.defaultCode = XML | ||
| + | config { | ||
| + | disableAllHeaderCode = 1 | ||
| + | additionalHeaders = Content-type:text/xml | ||
| + | no_cache = 1 | ||
| + | xhtml_cleaning = 0 | ||
| + | } | ||
| + | } | ||
| + | |||
| + | </pre> | ||
| + | |||
| + | Zum Vergleich das Original statische Template | ||
| + | |||
| + | '''TypoScript anpassen''' | ||
| + | |||
| + | |||
| + | |||
| + | '''Template anpassen''' | ||
| + | |||
| + | |||
| + | |||
| + | '''Link und Anleitung''' | ||
Version vom 26. April 2010, 19:55 Uhr
Beispiel für Link im Header der Seite
<link rel="alternate" type="application/rss+xml" title="t3n Magazin RSS Feed" href="http://t3n.de/magazin/feed/" />
RSS für TYPO3
tt_news Beiträge lassen sich sehr einfach als RSS News Feed bereitstellen.
Quick
Statisches Template
tt_news stellt ein statisches Template bereit, daß die wichtigsten Einstellungen vornimmt. Man kann natürlich auch alles selber machen. Wie unten gezeigt. Aber einfacher ist das statische.
Beispiel für eigenes TypoScript
### RSS ###
# Configure tt_news to display the xml template
plugin.tt_news {
displayXML {
# rss091_tmplFile = EXT:tt_news/res/rss_0_91.tmpl
# rdf_tmplFile = EXT:tt_news/res/rdf.tmpl
# atom03_tmplFile = EXT:tt_news/res/atom_0_3.tmpl
# atom1_tmplFile = EXT:tt_news/res/atom_1_0.tmpl
rss2_tmplFile = EXT:tt_news/res/rss_2.tmpl
# possibile values: rss091 / rss2 / rdf / atom03 / atom1
xmlFormat = rss2
xmlTitle = dekra-aviation: News
xmlLink = http://dekra-aviation.com/
xmlDesc = Latest News
xmlLang = de
xmlIcon = fileadmin/tt_news_article.gif
title_stdWrap.htmlSpecialChars = 1
title_stdWrap.htmlSpecialChars.preserveEntities = 1
subheader_stdWrap.stripHtml = 1
subheader_stdWrap.htmlSpecialChars = 1
subheader_stdWrap.htmlSpecialChars.preserveEntities = 1
subheader_stdWrap.crop = 100 | ... | 1
subheader_stdWrap.ifEmpty.field = bodytext
xmlLastBuildDate = 1
}
}
## This enables the xml news feed
xmlnews = PAGE
xmlnews {
typeNum = 100
10 >
10 < plugin.tt_news
10.pid_list >
10.pid_list = 322
10.singlePid = {$plugin.tt_news.singlePid}
10.defaultCode = XML
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:text/xml
no_cache = 1
xhtml_cleaning = 0
}
}
Zum Vergleich das Original statische Template
TypoScript anpassen
Template anpassen
Link und Anleitung