Добрый день!
Понадобилось сделать что-то вроде "новости дня" - полнотекстовая последняя новость.
Сделал SINGLE страницу, создал для этой страницы дополнительный шаблон (+ext), в TypoScript Setup code
поместил текст из доки, соответственно скорректировав
plugin.tt_news.singlePid и pidInList:
# hide the "no news id" message
#
plugin.tt_news._LOCAL_LANG.default.noNewsIdMsg =
# set the tt_news singlePid to the current page
#
plugin.tt_news.singlePid = 953
# fill the content of the main-column to a tmp.object
#
tmp.pagecontent < page.10.subparts.contentarea
# clear the content of the main column
#
page.10.subparts.contentarea >
# build a new object for this column as content-object-array
#
page.10.subparts.contentarea = COA
page.10.subparts.contentarea {
10 = CONTENT
10.table = tt_news
10.select {
# insert the pids of all pages from where you want to fetch news.
# the recursive-field has no influence on this selection
pidInList = 938,305
orderBy = datetime desc
max = 1
}
# insert the object “10.” only if there is no SINGLE news selected
#
10.stdWrap.if.isFalse.data = GPvar:tx_ttnews|tt_news
# re-insert the normal pagecontent to the page
#
20 < tmp.pagecontent
}
И... ничего. id последней новости туда не передается. Все новости, включая и эту страницу из LIST, например, работают. Что я сделал не так?
tt_news v2.4.0, typo v4.0.1