【问题标题】:Custom content element is not rendered in front-end自定义内容元素未在前端呈现
【发布时间】:2015-04-27 13:49:13
【问题描述】:

需要有关未呈现的自定义内容元素的帮助。 这是我的打字稿:

tt_content.cat_button = FLUIDTEMPLATE
tt_content.cat_button {
    template = FILE
    template.file = EXT:so_product/Resources/Private/Templates/ContentELements/CategoryButton.html
    layoutRootPath = EXT:so_product/Resources/Private/Layouts/
}

即使我拼错了CategoryButton.html,也不会出现错误消息。那么如何知道是否找到了正确的模板呢?

如果我删除行 templatetemplate.file,我会收到消息“糟糕,找不到模板...”

我的模板只包含<p>Test</p>。我也需要部分和布局吗?

这是我使用的指南:http://docs.typo3.org/typo3cms/extensions/sitepackage/CustomContentElements/Index.html

日志中没有错误。

【问题讨论】:

    标签: typo3 typo3-6.2.x


    【解决方案1】:

    你的打字错了。

    检查 TSRef http://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Fluidtemplate/Index.html

    tt_content.cat_button = FLUIDTEMPLATE
    tt_content.cat_button {
       file = EXT:so_product/Resources/Private/Templates/ContentELements/CategoryButton.html
    }
    

    【讨论】:

    • 不,这是一个错字>ContentELements -> ContentElements。但上面的 TS 有效。
    【解决方案2】:

    简单的错字:

    ContentELements -> ContentElements

    还有 TYPO3 中没有显示错误消息的错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-05-22
      • 2019-09-08
      • 1970-01-01
      • 1970-01-01
      • 2015-10-28
      • 2021-12-09
      • 2015-10-27
      • 1970-01-01
      相关资源
      最近更新 更多