Skip to content

Commit

Permalink
[TASK] Merge properties back into columns page (#1175)
Browse files Browse the repository at this point in the history
Releases: main, 12.4
  • Loading branch information
linawolf authored Sep 26, 2024
1 parent 86e39e6 commit 916008e
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 87 deletions.
48 changes: 0 additions & 48 deletions Documentation/Palettes/Examples.rst

This file was deleted.

61 changes: 58 additions & 3 deletions Documentation/Palettes/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
14 changes: 0 additions & 14 deletions Documentation/Palettes/Properties/Index.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
.. include:: /Includes.rst.txt

===============
isHiddenPalette
===============

.. confval:: isHiddenPalette
:name: palettes-isHiddenPalette
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
.. include:: /Includes.rst.txt
.. _palettes-properties-label:

=====
label
=====

.. confval:: label
:name: palettes-label
:Path: $GLOBALS['TCA'][$table]['palettes']
Expand Down
Original file line number Diff line number Diff line change
@@ -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']
Expand Down

0 comments on commit 916008e

Please sign in to comment.