contao-component-style-manager
contao-component-style-manager copied to clipboard
Multi domain / multi theme usage
I use your extension the first time and it looks very promising. Seems like I found a worthy successor of stylepicker4ward. One thing I miss in a multi domain setup is that styles can be limited for different themes and only applied if the page uses a layout of the theme (I know in news etc you don't have the relation).
In my point of view, the style should belong to a theme and should be import and export able using the Contao theme support. Wdyt?
To assign specific styles to a theme is a bit diffucult, cause of components like forms and form elements which do not belong to a single theme. Wrapping style items in an archive like news and events could be a possible way to add more logic. But a stable possibility to display styles only of a specific theme can lead to problems. All selected classes of an article, content element and all other style manager components will be saved by saving the actual record to save performance (frontend).
To export and import style manager compontents by a themes sounds good and could offer added value.
The Import / Export functionality is now available. https://github.com/oveleon/contao-component-style-manager/commit/bff99372e9ecf0a3f2312179add56e1d8a95571d
To assign specific styles to a theme is a bit diffucult, cause of components like forms and form elements which do not belong to a single theme.
There could be some ways so solve it, but maybe using the permission system (user groups) of Contao would be better.
Would it be possible to add an option to restrict style groups to page trees? I have a multidomain setup which shares the same theme, but for some domains I would not show every style group.
This does not exist yet, maybe you can help yourself with the Hook styleManagerSkipField
and add the check yourself.
Are there any plans to implement this in the next versions?
It could well be that it will be implement in the future. Concrete work on this has not yet taken place and is not planned from our side for the time being. A certain concept can be gladly submitted as PR.
@dmolineus feel free to reopen this with a concept and a PR