【问题标题】:Typo3 News Extension: "TypoScript object path "lib.tx_news.contentElementRendering" does not exist"Typo3 新闻扩展:“TypoScript 对象路径“lib.tx_news.contentElementRendering”不存在”
【发布时间】:2021-07-29 15:36:10
【问题描述】:

在不知情的情况下更改了配置或模板中的某些内容,我无法在新闻文章的详细视图中输出内容元素。

1/1) #1253191023 TYPO3Fluid\Fluid\Core\ViewHelper\Exception

TypoScript object path "lib.tx_news.contentElementRendering" does not exist

我有这个配置:

typo3conf/ext/news/Configuration/TypoScript/setup.txt

# Rendering of content elements in detail view
lib.tx_news.contentElementRendering = RECORDS
lib.tx_news.contentElementRendering {
    tables = tt_content
    source.current = 1
    dontCheckPid = 1
}

typo3conf/ext/site_package/Resources/Plugin/News/Templates/News/Detail.html

<f:if condition="{newsItem.contentElements}">
 <!-- content elements -->
 <f:cObject typoscriptObjectPath="lib.tx_news.contentElementRendering">
  {newsItem.contentElementIdList}
 </f:cObject>
</f:if>

在我看来,这是文档中推荐的内容:https://docs.typo3.org/p/georgringer/news/master/en-us/Tutorials/Templates/RenderContentElements/Index.html

Typo3 版本:10.4.12

新闻版本:8.5.2

我不知道为什么我突然不能在新闻文章中输出内容元素。

谁能帮忙?

【问题讨论】:

  • 请提及您的 TYPO3 和新闻版本。
  • Typo3 10.4.12 新闻 8.5.2
  • 您是否在 (TypoScript-)Template 中包含了 EXT:news 的静态 TypoScript? docs.typo3.org/p/georgringer/news/master/en-us/…
  • 你是对的,静态模板不包括在内...谢谢。我怎样才能把这个问题交给你?

标签: typo3 typo3-extensions tx-news typo3-10.x


【解决方案1】:

如果未定义lib.tx_news.contentElementRendering,很可能您忘记包含 EXT:news 的静态 TypoScript 模板。

News system - Installation:

准备工作:包含静态 TypoScript

该扩展附带了一些需要包含的 TypoScript 代码。

  1. 切换到您网站的根页面。
  2. 切换到模板模块并选择信息/修改。
  3. 点击链接编辑整个模板记录并切换到包含选项卡。
  4. 在字段包括静态(来自扩展)中选择新闻(新闻):

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-11-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多