【问题标题】:How force a template file in tt_news LIST?如何在 tt_news LIST 中强制使用模板文件?
【发布时间】:2016-11-10 19:59:06
【问题描述】:

我在 tt_news 中有一个列表,并使用许多包含 tt_news 记录的文件夹。当我过滤和显示特定类别时,我想在此列表中使用不同的模板。

我的排版是:

[globalVar = GP:tx_ttnews|place|0 = 79]
    #Display list of specific category   
    plugin.tt_news.templateFile = fileadmin/templates/plugins/tt_news/different.html
[else]
    #General display list
    plugin.tt_news.templateFile = fileadmin/templates/plugins/tt_news/general.html
[end]

我使用过plugin.tt_news.templateFileplugin.tt_news.file.templateFile,但不起作用。我正在使用最新版本的 tt_news 和 TYPO3 6.2

【问题讨论】:

    标签: typo3 typoscript typo3-6.2.x tt-news


    【解决方案1】:

    plugin.tt_news.templateFile”是对的,我认为“[globalVar = GP:tx_ttnews|place|0 = 79]”有问题你应该用“[global]”而不是“[end]”关闭全局。如果对你有帮助,试试这个。

    【讨论】:

      【解决方案2】:

      对于Typoscript的方式没有解决这个问题,我没有为什么?由于我们需要在tt_news的模板中使用类别和标记,并通过JS在前端创建一个逻辑来解决这个问题。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-08-07
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-04-07
        相关资源
        最近更新 更多