Typo3 TT_新闻强制显示单个/最新实施中的最新新闻(类型3)
先生们 我有一个很好的单一和最新的工作实现在同一页上。我的realurl工作得很好。问题是,默认情况下,single不会显示任何内容,直到您单击列出的新闻之一(由列表插件显示)。我想单插件显示登陆的最新消息Typo3 TT_新闻强制显示单个/最新实施中的最新新闻(类型3),typo3,typoscript,tt-news,Typo3,Typoscript,Tt News,先生们 我有一个很好的单一和最新的工作实现在同一页上。我的realurl工作得很好。问题是,默认情况下,single不会显示任何内容,直到您单击列出的新闻之一(由列表插件显示)。我想单插件显示登陆的最新消息 有什么想法吗?一个解决方案是更改特定新闻插件中最新视图的文本限制,如下所示: plugin.tt_news.displayLatest.subheader_stdWrap.crop = 10000 | ... | 1 并且还提供一个单独的模板文件,无需 <!--###LINK_ITE
有什么想法吗?一个解决方案是更改特定新闻插件中最新视图的文本限制,如下所示:
plugin.tt_news.displayLatest.subheader_stdWrap.crop = 10000 | ... | 1
并且还提供一个单独的模板文件,无需
<!--###LINK_ITEM###-->
“最新视图”部分中的标记。扩展名
添加了一个新的tt_新闻代码:SAFE_SINGLE,它确保单个新闻
即使未指定项目,也会显示项目。如果一篇新闻文章
选中后,它将简单地显示它。如果未选择任何选项,则将显示
已配置类别的最新新闻文章
也许它可以帮助您。为什么不提供一个“单一/最新”视图,显示单一视图(如果已提交)和最新视图(如果未请求单一视图)。在此插件中,将最新消息限制设置为“1”
下面添加另一个最新的(或列表),新闻限制设置为3(或根据需要)第一个解决方案 请求行为的解决方案如所述: 默认新闻id 将以下行插入到位于的ext模板的设置字段中 要在单个视图中显示最新新闻项的页面 如果未请求其他记录的单一视图:
请注意,在这两种解决方案中,用于插入默认记录的模板子部分不是#############模板#单#记录插入####################,我得出的结论是,如果不弄乱tt_新闻扩展代码,实现它几乎是不可能的。为了避免大家遇到很多问题,只需从ter安装扩展名:xw_ttnewslatestsingle,然后在默认的tt_新闻模板中添加扩展名。然后,打开单个插件并将其状态更改为SINGLELATEST。节约和享受!很好用!请接受答案或将您的解决方案作为答案发布并接受。
# 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 = 977
# 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 = 1078,1079,1080,1081,1082,1083,1084
orderBy = datetime desc
max = 1
}
# insert the object “10.” only if there is no SINGLE news selected
# ATTENTION, OUTDATED IN MANUAL, USE GP:... instead of GPvar:... !!!
#10.stdWrap.if.isFalse.data = GPvar:tx_ttnews|tt_news
10.stdWrap.if.isFalse.data = GP:tx_ttnews|tt_news
# re-insert the normal pagecontent to the page
20 < tmp.pagecontent
}
# use the "no news id" message position for the latest news record
plugin.tt_news.singlePid = 977
plugin.tt_news.noNewsIdMsg_stdWrap.cObject = COA
plugin.tt_news.noNewsIdMsg_stdWrap.cObject {
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 = 1078,1079,1080,1081,1082,1083,1084
orderBy = datetime desc
max = 1
}
}