tt_news 静态单视图 news_id

tt_news single view with static news_id

我正在使用带有插件 tt_news 的 Typo3 版本 6.2。

我只想:

用例:

我们公司有很多部门。对于每个部门,我们的网站上都有几个子页面。现在我想向每个部门网站添加特定新闻。点赞:在团队管理页面我想显示ID = XY的消息。

有什么方法可以让它工作吗?

如果没有请求其他记录的单一视图,请将以下行插入到要在单一视图中显示所选新闻项目的页面的 ext 模板的设置字段中:

# 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 = 25 # your pid
    # orderBy = datetime desc
    max = 1
   # get element with news id 10 @zarathustra
   where = tt_news.uid=10
  }
# 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
}

这里有更多信息 http://docs.typo3.org/typo3cms/extensions/tt_news/3.5.1/ExtNews/Configuration/TyposcriptExamples/Index.html#default-news-id