【问题标题】:Extended NEWS and Partials is not renderingExtended NEWS 和 Partials 未呈现
【发布时间】:2018-06-18 17:36:07
【问题描述】:

我使用扩展 NEWS 的扩展程序。

这是我的模板文件设置

plugin.tx_news {
view {
    event {
        templateRootPath = fileadmin/templates/news/events/Templates
        partialRootPath = fileadmin/templates/news/events/Partials
    }
}}

动作为EventList,模板文件admin/templates/news/events/Templates/EventList.html渲染OK。

在该模板中,我用

调用部分模板
<f:for each="{news}" as="newsItem" iteration="iterator">
    <f:debug>{newsItem}</f:debug>
    <f:render partial="Eventlist/Item" arguments="{newsItem: newsItem,settings:settings,iterator:iterator}" />
</f:for>

f:debug 告诉我消息。

文件fileadmin/templates/news/events/Partials/EventList/Item.html存在。

对此有任何想法。

TYPO3 7.6.29 新闻 6.1.1

【问题讨论】:

  • EventList vs Eventlist,L vs l

标签: typo3 fluid tx-news


【解决方案1】:

您的设置排版模板的两个注释:

plugin.tx_news {
    view {
        event {
            // use *Paths (plural) with a higher number
            // but maybe you meant constants, then the singular is alright
            templateRootPaths.10 = fileadmin/templates/news/events/Templates
            partialRootPaths.10 = fileadmin/templates/news/events/Partials
        }
    // never ever!!!! try to close multiple brackets in one line
    // TYPO3 recognizes only brackets at the beginning of a line
    // sidenote: the same for multiline comments: 
    //           '/*' and '*/' only at the beginning of a line
    }
}

正如 georg 已经评论的那样:您的错误可能是您部分路径中EventList 的正确拼写。

您可能会通过切换到开发模式 (Installtool) 并在您的打字设置中进行配置来获得更多错误信息:

config.contentObjectExceptionHandler = 0

【讨论】:

    猜你喜欢
    • 2012-05-04
    • 2020-02-01
    • 1970-01-01
    • 2018-06-13
    • 1970-01-01
    • 1970-01-01
    • 2016-10-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多