-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Correct indentation, * add names for confvals * transfer code-blocks to new syntax releases: main, 12.4, 11.5
- Loading branch information
Showing
7 changed files
with
127 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
.. include:: /Includes.rst.txt | ||
.. _palettes-properties-description: | ||
.. include:: /Includes.rst.txt | ||
.. _palettes-properties-description: | ||
|
||
=========== | ||
description | ||
=========== | ||
|
||
.. versionadded:: 11.3 | ||
The palettes description property has been added with TYPO3 v11.3. | ||
.. versionadded:: 11.3 | ||
The palettes description property has been added with TYPO3 v11.3. | ||
|
||
.. confval:: description (palettes) | ||
.. confval:: description | ||
:name: palettes-description | ||
:Path: $GLOBALS['TCA'][$table]['palettes'] | ||
:type: string | ||
|
||
:Path: $GLOBALS['TCA'][$table]['palettes'] | ||
:type: string | ||
Allows to display a localized description text into the palette declaration. | ||
It will be displayed below the | ||
:ref:`palette label<palettes-properties-label>`. | ||
|
||
Allows to display a localized description text into the palette declaration. | ||
It will be displayed below the | ||
:ref:`palette label<palettes-properties-label>`. | ||
This additional help text can be used to clarify some field usages directly | ||
in the UI. | ||
|
||
This additional help text can be used to clarify some field usages directly | ||
in the UI. | ||
.. note:: | ||
|
||
.. note:: | ||
|
||
In contrast to the palette label, the description property can not | ||
be overwritten on a record type basis. | ||
In contrast to the palette label, the description property can not | ||
be overwritten on a record type basis. | ||
|
||
Example | ||
======= | ||
|
||
.. include:: /Images/Rst/PaletteDescription.rst.txt | ||
.. include:: /Images/Rst/PaletteDescription.rst.txt | ||
|
||
.. include:: /CodeSnippets/PaletteDescription.rst.txt | ||
.. include:: /CodeSnippets/PaletteDescription.rst.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
.. include:: /Includes.rst.txt | ||
.. _palettes-properties: | ||
.. include:: /Includes.rst.txt | ||
.. _palettes-properties: | ||
|
||
========== | ||
Properties | ||
========== | ||
|
||
|
||
.. toctree:: | ||
.. toctree:: | ||
|
||
IsHiddenPalette | ||
Label | ||
Description | ||
Showitem | ||
IsHiddenPalette | ||
Label | ||
Description | ||
Showitem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
.. include:: /Includes.rst.txt | ||
.. include:: /Includes.rst.txt | ||
|
||
=============== | ||
isHiddenPalette | ||
=============== | ||
|
||
.. confval:: isHiddenPalette | ||
.. confval:: isHiddenPalette | ||
:name: palettes-isHiddenPalette | ||
:Path: $GLOBALS['TCA'][$table]['palettes'] | ||
:type: boolean | ||
|
||
:Path: $GLOBALS['TCA'][$table]['palettes'] | ||
:type: boolean | ||
If set to true, this palette will never be shown, but the fields of the palette are technically | ||
rendered as hidden elements in FormEngine. | ||
|
||
If set to true, this palette will never be shown, but the fields of the palette are technically | ||
rendered as hidden elements in FormEngine. | ||
This is sometimes useful when you want to set a field's value by JavaScript from another user-defined field. | ||
You can also use it along with the IRRE (TCA columns type :ref:`inline <columns-inline>`) | ||
:ref:`foreign_selector <columns-inline-properties-foreign-selector>` feature if you don't want the relation | ||
field to be displayed (it must be technically present and rendered though, that's why you should put it to | ||
a hidden palette in that case). | ||
|
||
This is sometimes useful when you want to set a field's value by JavaScript from another user-defined field. | ||
You can also use it along with the IRRE (TCA columns type :ref:`inline <columns-inline>`) | ||
:ref:`foreign_selector <columns-inline-properties-foreign-selector>` feature if you don't want the relation | ||
field to be displayed (it must be technically present and rendered though, that's why you should put it to | ||
a hidden palette in that case). | ||
|
||
.. note:: | ||
The "isHiddenPalette" concept is more a hack than a solution in current FormEngine code. It has been | ||
introduced for the "FAL" file resource handling to have virtual fields which can be handled in JavaScript | ||
but are not displayed to the editor. It comes with the price of a bunch of HTML that is disabled | ||
via CSS if editing those records in the backend. The core will sooner or later reconsider this solution | ||
and substitute it with something more appropriate. Extension authors should stay away from this property | ||
if possible to not run into upgrade troubles if that happens. | ||
.. note:: | ||
The "isHiddenPalette" concept is more a hack than a solution in current FormEngine code. It has been | ||
introduced for the "FAL" file resource handling to have virtual fields which can be handled in JavaScript | ||
but are not displayed to the editor. It comes with the price of a bunch of HTML that is disabled | ||
via CSS if editing those records in the backend. The core will sooner or later reconsider this solution | ||
and substitute it with something more appropriate. Extension authors should stay away from this property | ||
if possible to not run into upgrade troubles if that happens. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,49 @@ | ||
.. include:: /Includes.rst.txt | ||
.. _palettes-properties-label: | ||
.. include:: /Includes.rst.txt | ||
.. _palettes-properties-label: | ||
|
||
===== | ||
label | ||
===== | ||
|
||
.. confval:: label (palettes) | ||
.. confval:: label | ||
:name: palettes-label | ||
:Path: $GLOBALS['TCA'][$table]['palettes'] | ||
:type: string | ||
|
||
:Path: $GLOBALS['TCA'][$table]['palettes'] | ||
:type: string | ||
Allows to display a localized label text as a dedicated entry into the palette declaration, instead as a part of | ||
the types configuration. | ||
By using the explicit label entry, code duplication upon reusing existing palettes can be reduced. The label is | ||
always shown with the palette, no matter where it is referenced. | ||
|
||
Allows to display a localized label text as a dedicated entry into the palette declaration, instead as a part of | ||
the types configuration. | ||
By using the explicit label entry, code duplication upon reusing existing palettes can be reduced. The label is | ||
always shown with the palette, no matter where it is referenced. | ||
Before: | ||
|
||
Before:: | ||
.. code-block:: php | ||
:caption: EXT:my_extension/Configuration/TCA/tx_myextension_table.php (Excerpt) | ||
'types' => [ | ||
'types' => [ | ||
'myType' => [ | ||
'showitem' => 'aField, --palette--;LLL:EXT:myExt/Resources/Private/Language/locallang.xlf:aPaletteDescription;aPalette, someOtherField', | ||
'showitem' => 'aField, --palette--;LLL:EXT:myExt/Resources/Private/Language/locallang.xlf:aPaletteDescription;aPalette, someOtherField', | ||
], | ||
], | ||
'palettes' => [ | ||
], | ||
'palettes' => [ | ||
'aPalette' => [ | ||
'showitem' => 'aFieldInAPalette, anotherFieldInPalette', | ||
'showitem' => 'aFieldInAPalette, anotherFieldInPalette', | ||
], | ||
], | ||
], | ||
After:: | ||
After: | ||
|
||
'types' => [ | ||
.. code-block:: php | ||
:caption: EXT:my_extension/Configuration/TCA/tx_myextension_table.php (Excerpt) | ||
'types' => [ | ||
'myType' => [ | ||
'showitem' => 'aField, --palette--;;aPalette, someOtherField', | ||
'showitem' => 'aField, --palette--;;aPalette, someOtherField', | ||
], | ||
], | ||
'palettes' => [ | ||
], | ||
'palettes' => [ | ||
'aPalette' => [ | ||
'label' => 'LLL:EXT:myExt/Resources/Private/Language/locallang.xlf:aPaletteDescription', | ||
'showitem' => 'aFieldInAPalette, anotherFieldInPalette', | ||
'label' => 'LLL:EXT:myExt/Resources/Private/Language/locallang.xlf:aPaletteDescription', | ||
'showitem' => 'aFieldInAPalette, anotherFieldInPalette', | ||
], | ||
], | ||
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,41 @@ | ||
.. include:: /Includes.rst.txt | ||
.. _palettes-properties-showitem: | ||
.. _palettes-linebreaks: | ||
.. _palettes-linebreaks-examples: | ||
.. include:: /Includes.rst.txt | ||
.. _palettes-properties-showitem: | ||
.. _palettes-linebreaks: | ||
.. _palettes-linebreaks-examples: | ||
|
||
======== | ||
showitem | ||
======== | ||
|
||
.. confval:: showitem (palettes) | ||
|
||
:Path: $GLOBALS['TCA'][$table]['palettes'] | ||
:Required: true | ||
:type: string (list of field names) | ||
|
||
Specifies which fields are displayed in which order in the palette, | ||
examples:: | ||
|
||
'showitem' => 'aFieldName, anotherFieldName', | ||
'showitem' => 'aFieldName;labelOverride, anotherFieldName', | ||
'showitem' => 'aFieldName, anotherFieldName, --linebreak--, yetAnotherFieldName', | ||
|
||
This string is a comma separated list of field names from :ref:`['columns'] section <columns>`, each field can | ||
optionally have a second, semicolon separated field to override the default :ref:`label <columns-properties-label>` | ||
property of the field. | ||
|
||
Instead of a field name, the special keyword `--linebreak--` can be used to place groups of fields on | ||
single lines. Note this line grouping only works well if the browser window size allows multiple fields | ||
next to each other, if the width is not sufficient the fields will wrap below each other anyways. | ||
|
||
.. caution:: | ||
A field name must only appear once in the entire record. Do not reference a single field within | ||
the showitem list of a types section and again in a palette used in the same type. Don't use | ||
a field in multiple palettes referenced in a type, or multiple times in one palette. | ||
.. confval:: showitem | ||
:name: palettes-showitem | ||
:Path: $GLOBALS['TCA'][$table]['palettes'] | ||
:Required: true | ||
:type: string (list of field names) | ||
|
||
Specifies which fields are displayed in which order in the palette, | ||
examples: | ||
|
||
.. code-block:: php | ||
:caption: EXT:my_extension/Configuration/TCA/tx_myextension_table.php (Excerpt) | ||
[ | ||
'showitem' => 'aFieldName, anotherFieldName', | ||
'showitem' => 'aFieldName;labelOverride, anotherFieldName', | ||
'showitem' => 'aFieldName, anotherFieldName, --linebreak--, yetAnotherFieldName', | ||
] | ||
This string is a comma separated list of field names from :ref:`['columns'] section <columns>`, each field can | ||
optionally have a second, semicolon separated field to override the default :ref:`label <columns-properties-label>` | ||
property of the field. | ||
|
||
Instead of a field name, the special keyword `--linebreak--` can be used to place groups of fields on | ||
single lines. Note this line grouping only works well if the browser window size allows multiple fields | ||
next to each other, if the width is not sufficient the fields will wrap below each other anyways. | ||
|
||
.. caution:: | ||
A field name must only appear once in the entire record. Do not reference | ||
a single field within the :ref:`showitem <types-properties-showitem>` | ||
list of a types section and again in a palette used in the same type. | ||
Do not use a field in multiple palettes referenced in a type, or | ||
multiple times in one palette. |