benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.
https://www.bootstrap-package.com/
MIT License
337 stars 203 forks source link

Different TCA definition for rootpages in one TYPO3 instance #1099

Open olivermeckel opened 2 years ago

olivermeckel commented 2 years ago

We've one TYPO3 Installation serving 4 different websites (with own siteconfiguration/domains and content). I'm using TYPO3 10.4.20 with bootstrap_package 11.0.3 and a sitepackage for customizing and extending the bootstrap_package. The websites are structured in the same way and only have different colors and logos. We were able to do this by delivering individual CSS and simple conditions.

Now we want to add an other rootpage to TYPO3. This page will differ significantly from the previous webseites. Therefore it should get its own sitepackage.

So we disabled autoloading RTE, Backenlayouts, TCEMAIN, TCEFORM, Content Element PageTS Configuration in the configuration of the extensions and added them manually in the ressources of the siteconfiguration.

So it looks something like this

rootpage id 1 rootpage id 2 rootpage id 3 rootpage id 4

rootpage id 5

So far, so good. We can serve different Backend Layouts, customize TCEMAIN and TCEFORM. Also customizing the templates is no problem. But changes in TCA have an effect on all rootpages. We want to use different cropping ratios for images. When we make changes in the file 500_cropping.php in the TCA Overrides of Sitepackage B, e.g. for carousel images, it effects also the carousels in rootpages with Sitepackage A.

Now my question: Is it possible to have different tca definitions for the same content-element (e.g. for tx_bootstrappackage_carousel_item) in one TYPO3 instance? And how can we achieve that?

Best regards We look forward to your answers

benjaminkott commented 2 years ago

@olivermeckel that's simply not possible, but you can adjust values and defaults through TCEFORM and TCAdefaults you get pretty far with that, like disabling fields, adding options or removing options. TCA is always instance-wide.

Do you have an example of why you want to change TCA or what you want to change exactly?

olivermeckel commented 2 years ago

In some cases we needed additional fields to extend content elements. We managed this so far. the main point is, that the new layout has different sizes and ratios for the images. so we want to have different default cropping for the editors in the backend.

For example the thumbs in the page settings. The user can add images an crop them manually. We overwrote the settings for: $GLOBALS['TCA']['pages']['types'][$type]['columnsOverrides']['thumbnail']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants']['default'] $GLOBALS['TCA']['pages']['types'][$type]['columnsOverrides']['thumbnail']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants']['small'] All other configs are unset

This images are then used in the content elements "menu thumbnail list", "menu card list" and so on. For Sitepackage A the default ratio was 1:1, for the Sitepackage B we need the default ratio 16:9 and a special mobil format

The editor should only see this default settings and schould not be able to crop images in other ratios.