0

I work with EXT:news, inserting the plugin in the backend as content element on a page, I can override the fluid templates of the extension itself with my custom extension.

But I remain with the rendering of a division, the header and 'general data' (if defined) as sort of container which I cannot find how to make custom ...

I want to determine the whole output to suit my template, I'd like to substitute this:

<div id="cXX" class="frame frame-default frame-type-list frame-layout-0">
    <header>
        <h2 class=""> Header Plugin Content Element </h2>
    </header>

    // <div class="news">
    //    <!--TYPO3SEARCH_end-->
    //    <div class="news-list-view" id="news-container-XX">
    //        ...
    //    </div>
    //    <!--TYPO3SEARCH_begin-->
    // </div>

</div>

thanks for the attention

webman
  • 1,117
  • 15
  • 41

2 Answers2

1

I think that HTML comes from the rendering for each content element, although for plugins the DIV wrap and especially the header normally are not rendered.

That might be dependent on definitions of the framework/ package/ site extension you are using.

Look into the global rendering of content elements. There you can override the rendering , or make it dependent on the kind of plugin with your own condition.
For FSC(Fluid Styled Content) you can find (and add) template paths at lib.contentElement.*Paths.

If you want a special solution for your plugin you can add a variant with a specific condition in your copy of EXT:fluid_styled_content/Resources/Private/Layouts/Default.html or you modify EXT:fluid_styled_content/Resources/Private/Templates/List.html to use another layout for all plugins (one without the usual wrapping for all CEs).

Be aware that an anchor might be helpful for any CE.

Bernd Wilke πφ
  • 10,390
  • 1
  • 19
  • 38
  • In most Content Elements you find in the sysext fluid_styled_content a template that calls for the default layout that includes exactly what I want to override ... for the plugin I do not know where this is called for, 'global rendering of content elements' says nothing for me ... I use a clean typo3 setup and EXT:news, that's it, where should I look for the setting ? – webman Aug 24 '22 at 18:59
  • A specific TYPO3 version would be helpful. Look into the files I mentioned in my added paragraph. – Bernd Wilke πφ Aug 25 '22 at 05:17
  • I work with V11.5.13 ... thank you, I tried to find the fluid-template not knowing that 'List.html' applied ... I was looking for 'Plugin.html' somehow, now I have all the control I was looking for ! – webman Aug 25 '22 at 14:33
0

You should define your own Layout template. In your custom template there should be a call to the Layout section. Change this to your custom layout.

Stefan Padberg
  • 505
  • 2
  • 17
  • EXT:news calls for its 'General.html' layout in list view, this template does not include at all the content I'd like to override ... it seems that somewhere there is loaded the 'Default.html' layout of the fluid_styled_content, but that I cannot control with a custom layout template ... – webman Aug 24 '22 at 19:02
  • Sorry for not being precise enough. You should change the Layout template of 'fluid_styled_content'. Overwrite it in 'lib.contentelement.views' with your own inside of which you can select the 'data.list_type' of your custom plugin and make the changes you need. But that is the same like Bernd explained in his answer. – Stefan Padberg Aug 26 '22 at 09:16