Gernott / mask

TYPO3 Extension Mask
https://www.facebook.com/typo3mask
GNU General Public License v2.0
128 stars 85 forks source link

[FEATURE] Possibility to use different configuration paths, based on the root page #401

Closed MisterMarlu closed 3 years ago

MisterMarlu commented 3 years ago

Currently all the configuration paths are stored in the extension settings, which can be changed for the whole TYPO3 installation.

I have some TYPO3 instances with multiple root pages, using the same mask elements (like an image-text-box), but with different styles, maybe different templates and different RTE presets.

In the mask.json the default RTE preset will be stored, this is a problem on different RTE presets in different root pages. Maybe it is possible to move the configuration paths into TypoScript (Typo3 templates) so the paths can be changed per root page.

Cheers

nhovratov commented 3 years ago

@MisterMarlu

You can already do this! But not directly with mask:

[site("identifier") == 'site2']
  lib.maskContentElement.templateRootPaths {
    20 = EXT:sitepackage/Resources/Private/Mask/Frontend/Site2/Templates
  }
[end]

Mask uses the key 10 for the paths defined in extensions settings. By using a higher key you can override templates. Same goes with layouts and partials of course.

Which version of mask are you using? In the latest version the RTE presets are not stored in mask.json, so you can override them with TCA. In the upcoming version of mask this will be selectable in the builder.

If your templates differ only in color schemes and other small changes, you can use the siteProcessor: https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/ContentObjects/Fluidtemplate/DataProcessing/SiteProcessor.html Then you can maybe add a global class to differentiate between sites.

If you have more questions, just leave them here or close this issue if it works out for you.

MisterMarlu commented 3 years ago

Ah cool, thanks alot. In an older project I use v5.1.1 (this is where I want to change the presets), in all other projects v6.6.3

nhovratov commented 3 years ago

You can safely update to v6 there are no breaking changes, but a lot new features and bugfixes. You might need to clear the cache then.

nhovratov commented 3 years ago

I think your question is answered, so I close this one.