diff --git a/Documentation/Palettes/Examples.rst b/Documentation/Palettes/Examples.rst deleted file mode 100644 index 43324220..00000000 --- a/Documentation/Palettes/Examples.rst +++ /dev/null @@ -1,48 +0,0 @@ -.. include:: /Includes.rst.txt -.. _palettes-examples: - -======== -Examples -======== - -The TCA of the styleguide extension provides palettes with different properties. - -.. include:: /Images/Rst/Palette.rst.txt - -Palettes get defined in the section :php:`palettes` of the tables TCA array. - -The following TCA section specifies the different palettes. - -.. include:: /CodeSnippets/Palettes.rst.txt - -The palettes then get referenced in the :php:`types` section: - -.. include:: /CodeSnippets/PalettesTypes.rst.txt - - - -It is also possible to define the label of a palette directly in the palette -definition. Declaring the label in an 'palettes' array can reduce boilerplate -declarations if a palette is used over and over again in multiple types. If a -label is defined for a palette this way, it is always displayed. Setting a -specific label in the 'types' array for a palette overrides the default label -that was defined within the 'palettes' array. There is no way to unset a label -that is set within the 'palettes' array. It will always be displayed. - -Example: - - -.. code-block:: php - :caption: EXT:my_extension/Configuration/TCA/tx_myextension_table.php (Excerpt) - - 'types' => [ - 'myType' => [ - 'showitem' => 'aField, --palette--;;aPalette, someOtherField', - ], - ], - 'palettes' => [ - 'aPalette' => [ - 'label' => 'LLL:EXT:myExt/Resources/Private/Language/locallang.xlf:aPaletteDescription', - 'showitem' => 'aFieldInAPalette, anotherFieldInPalette', - ], - ], diff --git a/Documentation/Palettes/Index.rst b/Documentation/Palettes/Index.rst index 881c596a..3d235575 100644 --- a/Documentation/Palettes/Index.rst +++ b/Documentation/Palettes/Index.rst @@ -19,7 +19,62 @@ To modify existing palettes you can use the utility functions :php:`ExtensionManagementUtility::addFieldsToAllPalettesOfField`. -.. toctree:: +.. contents:: Table of Contents - Examples - Properties/Index +.. _palettes-examples: + +Examples +======== + +The TCA of the styleguide extension provides palettes with different properties. + +.. include:: /Images/Rst/Palette.rst.txt + +Palettes get defined in the section :php:`palettes` of the tables TCA array. + +The following TCA section specifies the different palettes. + +.. include:: /CodeSnippets/Palettes.rst.txt + +The palettes then get referenced in the :php:`types` section: + +.. include:: /CodeSnippets/PalettesTypes.rst.txt + +It is also possible to define the label of a palette directly in the palette +definition. Declaring the label in an 'palettes' array can reduce boilerplate +declarations if a palette is used over and over again in multiple types. If a +label is defined for a palette this way, it is always displayed. Setting a +specific label in the 'types' array for a palette overrides the default label +that was defined within the 'palettes' array. There is no way to unset a label +that is set within the 'palettes' array. It will always be displayed. + +Example: + +.. code-block:: php + :caption: EXT:my_extension/Configuration/TCA/tx_myextension_table.php (Excerpt) + + 'types' => [ + 'myType' => [ + 'showitem' => 'aField, --palette--;;aPalette, someOtherField', + ], + ], + 'palettes' => [ + 'aPalette' => [ + 'label' => 'LLL:EXT:myExt/Resources/Private/Language/locallang.xlf:aPaletteDescription', + 'showitem' => 'aFieldInAPalette, anotherFieldInPalette', + ], + ], + +.. _palettes-properties: + +Properties of `palettes` section of TCA +======================================= + +.. confval-menu:: + :name: palettes + :display: table + :type: + :Scope: + + .. include:: _Properties/_*.rst.txt + :show-buttons: diff --git a/Documentation/Palettes/Properties/Index.rst b/Documentation/Palettes/Properties/Index.rst deleted file mode 100644 index ff7ec10b..00000000 --- a/Documentation/Palettes/Properties/Index.rst +++ /dev/null @@ -1,14 +0,0 @@ -.. include:: /Includes.rst.txt -.. _palettes-properties: - -========== -Properties -========== - - -.. toctree:: - - IsHiddenPalette - Label - Description - Showitem diff --git a/Documentation/Palettes/Properties/Description.rst b/Documentation/Palettes/_Properties/_Description.rst.txt similarity index 90% rename from Documentation/Palettes/Properties/Description.rst rename to Documentation/Palettes/_Properties/_Description.rst.txt index ab1cb9f4..ad1e2fe9 100644 --- a/Documentation/Palettes/Properties/Description.rst +++ b/Documentation/Palettes/_Properties/_Description.rst.txt @@ -1,10 +1,5 @@ -.. include:: /Includes.rst.txt .. _palettes-properties-description: -=========== -description -=========== - .. versionadded:: 11.3 The palettes description property has been added with TYPO3 v11.3. @@ -25,8 +20,7 @@ description In contrast to the palette label, the description property can not be overwritten on a record type basis. -Example -======= +.. rubric:: Example .. include:: /Images/Rst/PaletteDescription.rst.txt diff --git a/Documentation/Palettes/Properties/IsHiddenPalette.rst b/Documentation/Palettes/_Properties/_IsHiddenPalette.rst.txt similarity index 94% rename from Documentation/Palettes/Properties/IsHiddenPalette.rst rename to Documentation/Palettes/_Properties/_IsHiddenPalette.rst.txt index f08d2a82..aa537fc6 100644 --- a/Documentation/Palettes/Properties/IsHiddenPalette.rst +++ b/Documentation/Palettes/_Properties/_IsHiddenPalette.rst.txt @@ -1,8 +1,3 @@ -.. include:: /Includes.rst.txt - -=============== -isHiddenPalette -=============== .. confval:: isHiddenPalette :name: palettes-isHiddenPalette diff --git a/Documentation/Palettes/Properties/Label.rst b/Documentation/Palettes/_Properties/_Label.rst.txt similarity index 96% rename from Documentation/Palettes/Properties/Label.rst rename to Documentation/Palettes/_Properties/_Label.rst.txt index 5b7c7153..213c4e86 100644 --- a/Documentation/Palettes/Properties/Label.rst +++ b/Documentation/Palettes/_Properties/_Label.rst.txt @@ -1,10 +1,5 @@ -.. include:: /Includes.rst.txt .. _palettes-properties-label: -===== -label -===== - .. confval:: label :name: palettes-label :Path: $GLOBALS['TCA'][$table]['palettes'] diff --git a/Documentation/Palettes/Properties/Showitem.rst b/Documentation/Palettes/_Properties/_Showitem.rst.txt similarity index 96% rename from Documentation/Palettes/Properties/Showitem.rst rename to Documentation/Palettes/_Properties/_Showitem.rst.txt index 626f703b..38415618 100644 --- a/Documentation/Palettes/Properties/Showitem.rst +++ b/Documentation/Palettes/_Properties/_Showitem.rst.txt @@ -1,12 +1,7 @@ -.. include:: /Includes.rst.txt .. _palettes-properties-showitem: .. _palettes-linebreaks: .. _palettes-linebreaks-examples: -======== -showitem -======== - .. confval:: showitem :name: palettes-showitem :Path: $GLOBALS['TCA'][$table]['palettes']