Wrap a DIV around every table | FE with TS

609 Views Asked by At

i want to wrap a DIV around every content table in FE. The table is setting in a normal Text-Conentelement.

Know everyone who can i do this with TS? I found only configurations for single CEs, not an special content item, like a .

Thank you for help

1

There are 1 best solutions below

0
On

If you want to change the FE rendering when you use css_styled_content, you have to know that all is done in this file: typo3/sysext/css_styled_content/static/setup.txt

here you'll find:

tt_content.table = COA
tt_content.table {
    10 = < lib.stdheader

    20 = USER
    20.userFunc = TYPO3\CMS\CssStyledContent\Controller\CssStyledContentController->render_table
    20.field = bodytext
...
    20.innerStdWrap.wrap = |
}

Don't do your changes here, copy what you need in your own setup file (internal in a template object or include it from an external file) Else your changes will be lost after a core update

And know that you are here in the css_styled_content world, take the time to look around and try to understand what most of the code is doing. It will help you a lot if you ever need to change the FE output