0

嘿伙计们,

我一直在努力覆盖来自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
     }
  }
}
4

1 回答 1

0

我认为这与您的排版顺序有关。

在您的示例中,您有代码

tt_content {
    header < lib.contentElement
    :

复制lib.contentElement对象。它在检测到复制运算符时复制处于该状态的对象。将不包括以下任何更改。

如果您想构建一个引用,您可以在之后更改引用的(“复制”)对象,并且所有这些更改也应该是活动的,您需要使用引用运算符

tt_content {
    header =< lib.contentElement
    :
于 2018-02-07T12:15:37.370 回答