0

Hei guys,

I've been trying really hard to override the templates, partials, and headers of some default content elements from fluid_styled_content. For instance, lets say 'Header'.

I also have a data processing class to fetch certain fields from tt_content table to process inside the header. Anyhow, I can receive this fetched data inside the template. But not in the partials or layouts. Did anyone ever faced the same?

This was my TS setup :

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 Answers1

1

I assume it's about the order of your typoscript.

in your example you have the code

tt_content {
    header < lib.contentElement
    :

which copies the lib.contentElement object. it copies the object in that state it has in the moment when the copy operator is detected. any following changes will not be included.

If you want to build a reference, where you can change the referenced ('copied') object afterwards and all those changes should be active too you need to use the reference operator:

tt_content {
    header =< lib.contentElement
    :
Bernd Wilke πφ
  • 10,390
  • 1
  • 19
  • 38