The questions and answers here already explain how to use constants in plugins and / or constants in templates based on FLUIDTEMPLATE.
What I would like to do is something like in this answer: https://stackoverflow.com/a/41956201/2444812
but not have to assign each setting individually but put them in a container and assign that as variable. For plugins there is a mechanism to be able to access the settings easily, via {settings}
e.g. instead of doing:
10 = FLUIDTEMPLATE
10 {
variables {
setting1 = TEXT
setting2.value = {$constant1}
setting2 = TEXT
setting2.value = {$constant2}
}
I would like to do something (similar to):
lib.tx_myext.settings {
setting1 = {$plugin.tx_myext.settings.setting1}
setting2 = {$plugin.tx_myext.settings.setting1}
}
10 = FLUIDTEMPLATE
10 {
variables {
settings < lib.tx_myext.settings
}
And then use this in Fluid like {settings.setting1}
.