[TYPO3-german] News (tx_news) per TYPOscript einbinden mit flexibler Übergabe der Kategorie
Chris
typo3 at mediadreams.org
Sat Sep 3 11:35:14 CEST 2016
Manchmal muss man Dinge ruhen lassen, dann mit neuer Energie anschauen und vor allem die Doku komplett lesen :-)
Die Lösung zu meiner Fragestellung habe ich hier gefunden:
https://docs.typo3.org/typo3cms/extensions/news/AdministratorManual/BestPractice/IntegrationWithTypoScript/Index.html#show-news-items-with-same-category-in-detail-html
Hier nun mein funktionierender Code:
Fluid Template:
<f:cObject typoscriptObjectPath="lib.newsRelatedArticlesRegion">{category.uid}</f:cObject>
TYPOscript:
lib.newsRelatedArticlesRegion = USER
lib.newsRelatedArticlesRegion {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = News
pluginName = Pi1
vendorName = GeorgRinger
controller = News
settings =< plugin.tx_news.settings
settings {
limit = 5
orderDirection = desc
useStdWrap := addToList(categories)
categories.current = 1
categoryConjunction = or
excludeAlreadyDisplayedNews = 1
templateLayout = sidebar
}
persistence =< plugin.tx_news.persistence
view =< plugin.tx_news.view
action = list
switchableControllerActions.News.1 = list
}
More information about the TYPO3-german
mailing list