覆盖fluid_styled_content并不按预期工作

时间:2018-02-07 06:38:50

标签: typo3 fluid fluid-styled-content

嘿伙计们,

我一直在努力覆盖fluid_styled_content中某些默认内容元素的模板,部分和标题。 例如,让我们说“标题”。

我还有一个数据处理类,用于从tt_content表中获取某些字段以在头部内处理。 无论如何,我可以在模板中接收这个获取的数据。但不是局部或布局。 有没有人遇到过同样的事情?

这是我的TS设置:

lib.contentElement {
  templateRootPaths {
     200 = EXT:my_ext/Resources/Private/Templates/
  }
  partialRootPaths {
     200 = EXT:my_ext/Resources/Private/Partials/
  }
  layoutRootPaths {
     200 = EXT:my_ext/Resources/Private/Layouts/
  }
}

//custom content element definition

tt_content {
  header < lib.contentElement
  header {
     templateName = Header
     dataProcessing {
        1 = VENDOR\MyExt\DataProcessing\ContentProcessor
     }
  }
}

1 个答案:

答案 0 :(得分:0)

我认为这是关于你的错别字的顺序。

在您的示例中,您有代码

tt_content {
    header < lib.contentElement
    :

复制lib.contentElement对象。它将对象复制到检测到copy operator时的状态。任何以下更改都不会包含在内。

如果您要构建引用,您可以在其中更改引用的(&#39;复制的&#39;)对象,并且所有这些更改也应该是活动的,您需要使用{ {3}}:

tt_content {
    header =< lib.contentElement
    :
相关问题