Feature: #103437 - Introduce site sets
See forge#103437
Description
Site sets ship parts of site configuration as composable pieces. They are intended to deliver settings, TypoScript, TSconfig and reference enabled content blocks for the scope of a site.
Extensions can provide multiple sets in order to ship presets for different
sites or subsets (think of frameworks) where selected features are exposed
as a subset (example: typo3/
).
A set is defined in an extension's subfolder in Configuration/
, for
example EXT:
.
The folder name in Configuration/
is arbitrary, significant
is the name
defined in config.
. The name
uses a vendor/
scheme by convention, and should use the same vendor as the containing
extension. It may differ if needed for compatibility reasons (e.g. when sets are
moved to other extensions). If an extension provides exactly one set that should
have the same name
as defined in composer.
.
The config.
for a set that is composed of three subsets looks as
follows:
name: my-vendor/my-set
label: My Set
# Load TypoScript, TSconfig and settings from dependencies
dependencies:
- some-namespace/slider
- other-namespace/fancy-carousel
Sets are applied to sites via dependencies
array in site configuration:
base: 'http://example.com/'
rootPageId: 1
dependencies:
- my-vendor/my-set
Site sets can also be edited via the backend module Site Management > Sites.
A list of available site sets can be retrieved with the console command
bin/
.
Settings definitions
Sets can define settings definitions which contain more metadata than just a
value: They contain UI-relevant options like label
, description
, category
and tags
and types like int
, bool
, string
, stringlist
, text
or
color
. These definitions are placed in settings.
next to the site set file config.
.
settings:
foo.bar.baz:
label: 'My example baz setting'
description: 'Configure baz to be used in bar'
type: int
default: 5
Settings for subsets
Settings for subsets (e.g. to configure settings in declared dependencies)
can be shipped via settings.
when placed next to the set file
config.
.
Note that default values for settings provided by the set do not need to be
defined here, as defaults are to be provided within
settings.
.
Here is an example where the setting styles.
— as
provided by typo3/
— is configured via
settings.
:
styles:
content:
defaultHeaderType: 1
This setting will be exposed as site setting whenever the set
my-
is applied to a site configuration.
Impact
Sites can be composed of sets where relevant configuration, templates, assets and setting definitions are combined in a central place and applied to sites as one logical volume.
Sets have dependency management and therefore allow sharing code between multiple TYPO3 sites and extensions in a flexible way.