Edit headlines (header level) FLUID Powered TYPO3

2019-09-06 15:23发布

问题:

How can I edit my Header info fluidcontent_core Extension. I use it instead of the 'normal' CSS_Styled_Content with FLUIDPAGES 3.1.2, FLUX 7.1.2, FLUIDCONTENT 4.1.2, FLUIDCONTENT_CORE 4.1.1 and VHS 2.1.4 - the latest versions of FLuidTYPO3.

For example, I need an additional <div class="text-center">|</div> for my <h1> Header, like this

<div class="text-center">
  <h1>{textBla}</h1>
</div>

How can I add additional HTML-Code for h1 - h6 or change the labels 1,2,3,4,5,6 to Text Strings!?

In further projects I use lib.stdheader / tt_content for this case. But now it's all about FLUID. I've read the Dok, but I'm still helpless .. Thanks for your help.

回答1:

the templates of content_core are all in the Private dir of the ext. itself. If you take a look at them, you will see that the headers are rendered from a comma separated string set in the setup.ts and deflated as an array. You can make your ow array or create your own dropdown with whatever data you like. It is flux based so almost limitless.



回答2:

Thanks for your help, rob-ot! I think I've got it.

setup.ts

plugin.tx_fluidcontentcore {
  settings {
    header {
      classNames = testheader, blatest       
    }
    container {
      classNames = hello
    }
  }
}

I leave the header level at constants types = 1,2,3,4,5,6 and add new classNames. For my case I add also a new container className, so my output is like:

<div class="hello">
  <h1 class="blatest">
    Header only level 1
  </h1>
</div>

Thanks!