Skip to content

Commit

Permalink
[TASK] List common files in a site set
Browse files Browse the repository at this point in the history
Releases: main, 13.4
  • Loading branch information
linawolf committed Feb 4, 2025
1 parent 60ef3ca commit a3f4ae9
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 51 deletions.
23 changes: 12 additions & 11 deletions Documentation/ApiOverview/SiteHandling/SiteSets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ and PageTSConfig and can be assigned to one or more sites via the site module.
Site set definitions are created in the :path:`Configuration/Sets/` directory
and separated from each other by a sub-folder with any name. In this way,
it is also possible to create several site set definitions per extension. Each
of these sub-folders must have a :file:`config.yaml` that assigns at least a
of these sub-folders must have a :file:`config.yaml <set-config-yaml>` that assigns at least a
unique `name` and preferably also a unique `label` to the site set definition.

.. code-block:: yaml
Expand Down Expand Up @@ -84,7 +84,7 @@ Hidden site sets
Sets may be hidden from the backend set selection in
:guilabel:`Site Management > Sites` and the console command
:bash:`bin/typo3 site:sets:list` by adding a `hidden` flag to the
:file:`config.yaml` definition:
:file:`config.yaml <set-config-yaml>` definition:

.. code-block:: yaml
:caption: EXT:my_extension/Configuration/Sets/MyHelperSet/config.yaml
Expand Down Expand Up @@ -125,7 +125,7 @@ Site sets can also be added to a site via the backend module
Settings definitions
====================

Settings can be defined in a file called :file:`settings.definitions.yaml` in
Settings can be defined in a file called :file:`settings.definitions.yaml <set-settings-definitions-yaml>` in
a set, for example :file:`EXT:my_extension/Configuration/Sets/MySet/settings.definitions.yaml`.

Read more about :ref:`site-settings-definition`.
Expand All @@ -139,12 +139,12 @@ Override site settings defaults in a subsets
============================================

Settings for subsets (for example to configure settings in declared dependencies)
can be shipped via :file:`settings.yaml` when placed next to the set file
:file:`config.yaml`.
can be shipped via :file:`settings.yaml <set-settings-yaml>` when placed next to the set file
:file:`config.yaml <set-config-yaml>`.

Note that default values for settings provided by the set do not need to be
defined here, as defaults are to be provided within
:file:`settings.definitions.yaml`.
:file:`settings.definitions.yaml <set-settings-definitions-yaml>`.

Here is an example where the setting `styles.content.defaultHeaderType` as
provided by `typo3/fluid-styled-content` is configured via
Expand Down Expand Up @@ -174,8 +174,9 @@ TypoScript dependencies via sets are automatically ordered and
deduplicated.

Set-defined TypoScript can be shipped within a set. The files
:file:`setup.typoscript` and :file:`constants.typoscript` (placed next to the
:file:`config.yaml` file) will be loaded, if available.
:file:`setup.typoscript <set-setup-typoscript>` and
:file:`constants.typoscript <set-constants-typoscript>` (placed next to the
:file:`config.yaml <set-config-yaml>` file) will be loaded, if available.
They are inserted (similar to `static_file_include`) into the TypoScript chain
of the site TypoScript that will be defined by a site that is using sets.

Expand Down Expand Up @@ -206,8 +207,8 @@ be loaded multiple times, if a shared dependency is required by multiple sets.
Page TSconfig provider
======================

Page TSconfig is loaded from a file :file:`page.tsconfig`, if placed next to the
site set configuration file :file:`config.yaml` and is scoped to pages within
Page TSconfig is loaded from a file :file:`page.tsconfig <set-page-tsconfig>`, if placed next to the
site set configuration file :file:`config.yaml <set-config-yaml>` and is scoped to pages within
sites that depend on this set.

Therefore, extensions can ship page TSconfig without the need for database entries or
Expand Down Expand Up @@ -270,7 +271,7 @@ The site package example extension has the following file structure:

* ...

* composer.json
* :file:`composer.json <extension-composer-json>`
* ...

.. _site-sets-example-site-package-set:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Site settings definitions

Site settings definitions allow to define settings with a type and a guaranteed
default value. They can be defined in :ref:`site-sets`, in a file called
:file:`settings.definitions.yaml`.
:file:`settings.definitions.yaml <set-settings-definitions-yaml>`.

It is recommended to use site-sets and their UI configuration in favor of
TypoScript Constants.
Expand Down
4 changes: 2 additions & 2 deletions Documentation/ApiOverview/SiteHandling/SiteSettings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ For instance, settings can be used in custom frontend code to deliver features
which might vary per site for extensions. An example may be to configure
storage page IDs.

The settings are defined in the :file:`config/sites/<my_site>/settings.yaml`
The settings are defined in the :file:`config/sites/<my_site>/settings.yaml <set-settings-yaml>`
file.

.. _sitehandling-settings-add:

Adding site settings
====================

Add settings to the :file:`settings.yaml`:
Add settings to the :file:`settings.yaml <set-settings-yaml>`:

.. literalinclude:: _site-settings.yaml
:language: yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,63 +1,75 @@
.. include:: /Includes.rst.txt
.. _extension-configuration-sets:
:navigation-title: Sets

============
:file:`Sets`
============
.. include:: /Includes.rst.txt
.. _extension-configuration-sets:

=====================================
Extension folder `Configuration/Sets`
=====================================

.. versionadded:: 13.1
`Site sets <https://docs.typo3.org/permalink/t3coreapi:site-sets>`_ have
been introduces.
been introduced.

In this directory TYPO3 extensions can provide their
`Site sets <https://docs.typo3.org/permalink/t3coreapi:site-sets>`_.

Each set must be saved in its own directory and have at least a file called
:file:`config.yaml`.

.. contents:: Files in a set:

.. _extension-configuration-sets-config-yaml:

:file:`config.yaml` (mandatory)
===============================
.. typo3:file:: config.yaml
:name: set-config-yaml
:scope: set
:regex: /^.*Configuration\/Sets\/[\w\-]+\/config\.yaml$/
:shortDescription: Contains the definition of a site set. Mandatory.

Contains the `definition of a site set <https://docs.typo3.org/permalink/t3coreapi:site-sets-definition>`_
and its dependencies.
Contains the `definition of a site set <https://docs.typo3.org/permalink/t3coreapi:site-sets-definition>`_
and its dependencies.

Example:

.. include:: /ApiOverview/SiteHandling/_Sets/_site-package/_config.rst.txt

.. _extension-configuration-sets-settings-yaml:

:file:`settings.yaml`
=====================
.. typo3:file:: settings.yaml
:name: set-settings-yaml
:scope: set
:regex: /^.*Configuration\/Sets\/[\w\-]+\/settings\.yaml$/
:shortDescription: Override settings defined by other sets.

In this file an extension can override settings defined by other sets. For
example :ref:`Settings provided by site set "Fluid Styled Content" <typo3/cms-fluid-styled-content:site-set-fluid-styled-content-settings>`:
In this file an extension can override settings defined by other sets. For
example :ref:`Settings provided by site set "Fluid Styled Content" <typo3/cms-fluid-styled-content:site-set-fluid-styled-content-settings>`:

.. include:: /ApiOverview/SiteHandling/_Sets/_site-package/_settings.rst.txt

.. _extension-configuration-sets-settings-definitions-yaml:

:file:`settings.definitions.yaml`
=================================
.. typo3:file:: settings.definitions.yaml
:name: set-settings-definitions-yaml
:scope: set
:regex: /^.*Configuration\/Sets\/[\w\-]+\/settings\.definitions\.yaml$/
:shortDescription: Contains the setting definition and defaults of a set.

In this file an extension can define its own settings:
`Site settings definitions <https://docs.typo3.org/permalink/t3coreapi:site-settings-definition>`_.
In this file an extension can define its own settings:
`Site settings definitions <https://docs.typo3.org/permalink/t3coreapi:site-settings-definition>`_.

.. _extension-configuration-sets-setup-typoscript:

:file:`setup.typoscript`
========================
.. typo3:file:: setup.typoscript
:name: set-setup-typoscript
:scope: set
:regex: /^.*Configuration\/Sets\/[\w\-]+\/setup\.typoscript$/
:shortDescription: Provides frontend TypoScript for sites depending on this set.

This file contains the Frontend :ref:`TypoScript <t3tsref:guide-overview>`
that the set should provide. If the
extension keeps its TypoScript in folder `TypoScript <https://docs.typo3.org/permalink/t3coreapi:extension-configuration-typoscript>`_
for backward compatibility reasons this file **should** contain an import of
file :file:`Configuration/TypoScript/setup.typoscript` for the main set of the
extension:
This file contains the Frontend :ref:`TypoScript <t3tsref:guide-overview>`
that the set should provide. If the
extension keeps its TypoScript in folder `TypoScript <https://docs.typo3.org/permalink/t3coreapi:extension-configuration-typoscript>`_
for backward compatibility reasons this file **should** contain an import of
file :file:`Configuration/TypoScript/setup.typoscript` for the main set of the
extension:

.. code-block:: typoscript
:caption: EXT:my_extension/Configuration/Sets/MySet/setup.typoscript
Expand All @@ -67,17 +79,23 @@ extension:
.. _extension-configuration-sets-constants-typoscript:

:file:`constants.typoscript`
============================
.. typo3:file:: constants.typoscript
:name: set-constants-typoscript
:scope: set
:regex: /^.*Configuration\/Sets\/[\w\-]+\/constants\.typoscript$/
:shortDescription: Provides frontend TypoScript constants for sites depending on this set.

This file contains the Frontend TypoScript Constants that the set should
provide. This file can be used if your extension depends on other extensions
that still rely on TypoScript constants.
This file contains the Frontend TypoScript Constants that the set should
provide. This file can be used if your extension depends on other extensions
that still rely on TypoScript constants.

.. _extension-configuration-sets-page-tsconfig:

:file:`page.tsconfig`
=====================
.. typo3:file:: page.tsconfig
:name: set-page-tsconfig
:scope: set
:regex: /^.*Configuration\/Sets\/[\w\-]+\/page\.tsconfig$/
:shortDescription: Provides page TSconfig (backend TypoScript) for sites depending on this set.

This file contains the :ref:`Page TSconfig <t3tsref:pagetoplevelobjects>`
(backend TypoScript) that the set should provide.
This file contains the :ref:`Page TSconfig <t3tsref:pagetoplevelobjects>`
(backend TypoScript) that the set should provide.

0 comments on commit a3f4ae9

Please sign in to comment.