pluginstypo3fluidtemplatingfluid-styled-content

TYPO3: content element "plugin" -> custom fluid template


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


Solution

  • 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.