diff --git a/Documentation/ColumnsConfig/Type/Category/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Category/_Properties/_ShowIfEmpty.rst.txt new file mode 100644 index 00000000..85f74ae6 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Category/_Properties/_ShowIfEmpty.rst.txt @@ -0,0 +1,23 @@ +.. confval:: showIfEmpty + :name: category-showIfEmpty + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['showIfEmpty'] + :type: boolean + :Scope: Display + :Default: false + + .. versionchanged:: 14.2 + Starting with TYPO3, 14.2 relational fields are hidden when no + selectable items are available. Option `showIfEmpty` will disable this behaviour. + + By default, `category` fields are hidden when no categories are + available. Setting `showIfEmpty` to true displays this field type, even if no options + are available. + + .. code-block:: php + :caption: EXT:my_extension/Configuration/TCA/Overrides/pages.php + + $GLOBALS['TCA']['pages']['columns']['categories']['config']['showIfEmpty'] = true; + + Possible reasons why categories may not be available: no category records + have been created, all categories have been deleted, or + the current user has no permissions to access any of the categories. diff --git a/Documentation/ColumnsConfig/Type/Language/Index.rst b/Documentation/ColumnsConfig/Type/Language/Index.rst index 5386791c..df516901 100644 --- a/Documentation/ColumnsConfig/Type/Language/Index.rst +++ b/Documentation/ColumnsConfig/Type/Language/Index.rst @@ -61,6 +61,19 @@ types, except `pages`. In records on root level (`pid=0`) or on a page, outside of a site context, all languages from all site configurations are displayed in the new field. +.. versionchanged:: 14.2 + Fields of type `language` are now hidden by default if only one language is + available. + +`language` fields are hidden by default if only one language is +available. If they should be displayed, set +`showIfEmpty `_. + +Reasons why only one language is available include: + +* Only one language has been configured in :doc:`Site Management ` + + .. _columns-language-examples: .. _columns-language-simple-example: diff --git a/Documentation/ColumnsConfig/Type/Select/CheckBox/Index.rst b/Documentation/ColumnsConfig/Type/Select/CheckBox/Index.rst index a52c385a..9f1a5e01 100644 --- a/Documentation/ColumnsConfig/Type/Select/CheckBox/Index.rst +++ b/Documentation/ColumnsConfig/Type/Select/CheckBox/Index.rst @@ -124,3 +124,6 @@ Properties of the TCA column type `select` with renderType `selectCheckBox` .. include:: _Properties/_ReadOnly.rst.txt :show-buttons: + + .. include:: _Properties/_ShowIfEmpty.rst.txt + :show-buttons: diff --git a/Documentation/ColumnsConfig/Type/Select/CheckBox/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/CheckBox/_Properties/_ShowIfEmpty.rst.txt new file mode 100644 index 00000000..e1071a00 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/CheckBox/_Properties/_ShowIfEmpty.rst.txt @@ -0,0 +1,35 @@ +.. confval:: showIfEmpty + :name: select-checkbox-showIfEmpty + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['showIfEmpty'] + :type: boolean + :Scope: Display + :Default: false + + .. versionchanged:: 14.2 + Starting with TYPO3 14.2, relational fields are hidden when no selectable + items are available. Option `showIfEmpty` will disable this behaviour. + + By default, `select` fields and any render types are hidden when no + select items are available. Setting `showIfEmpty` to true displays the field + even if no options are available. + + .. code-block:: php + :caption: EXT:my_extension/Configuration/TCA/Overrides/pages.php + + $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; + + Possible reasons why no select items are available: + + * a `foreign_table `_ + is used and the referenced table has no records or none matching the + `foreign_table_where `_. + * a `foreign_table `_ + is used and the currently logged in user has no permissions for the + referenced table or its records. + * All items have been hidden via page TSconfig, for example, + `removeItems `_ + or `keepItems `_ + are inproperly configured. + * The `itemsProcessors `_ + or `itemsProcFunc `_ + had no result. diff --git a/Documentation/ColumnsConfig/Type/Select/MultipleSideBySide/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/MultipleSideBySide/_Properties/_ShowIfEmpty.rst.txt new file mode 100644 index 00000000..82b44015 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/MultipleSideBySide/_Properties/_ShowIfEmpty.rst.txt @@ -0,0 +1,35 @@ +.. confval:: showIfEmpty + :name: select-byside-showIfEmpty + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['showIfEmpty'] + :type: boolean + :Scope: Display + :Default: false + + .. versionchanged:: 14.2 + Starting with TYPO3 14.2, relational fields are hidden when no selectable + items are available. Option `showIfEmpty` will disable this behaviour. + + By default, `select` fields and any render types are hidden when no + select items are available. Setting `showIfEmpty` to true displays the field + even if no options are available. + + .. code-block:: php + :caption: EXT:my_extension/Configuration/TCA/Overrides/pages.php + + $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; + + Possible reasons why no select items are available: + + * a `foreign_table `_ + is used and the referenced table has no records or none matching the + `foreign_table_where `_. + * a `foreign_table `_ + is used and the currently logged in user has no permissions for the + referenced table or all of it records. + * All items have been hidden via page TSconfig, for example, + `removeItems `_ + or `keepItems `_ + are inproperly configured. + * The `itemsProcessors `_ + or `itemsProcFunc `_ + had no result. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ShowIfEmpty.rst.txt new file mode 100644 index 00000000..c1c4e9e2 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ShowIfEmpty.rst.txt @@ -0,0 +1,35 @@ +.. confval:: showIfEmpty + :name: select-single-showIfEmpty + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['showIfEmpty'] + :type: boolean + :Scope: Display + :Default: false + + .. versionchanged:: 14.2 + Starting with TYPO3 14.2, relational fields are hidden when no selectable + items are available. Option `showIfEmpty` will disable this behaviour. + + By default, `select` fields and any render types are hidden when no + select items are available. Setting `showIfEmpty` to true displays the field + even if no options are available. + + .. code-block:: php + :caption: EXT:my_extension/Configuration/TCA/Overrides/pages.php + + $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; + + Possible reasons why no select items are available: + + * a `foreign_table `_ + is used and the referenced table has no records or none matching the + `foreign_table_where `_. + * a `foreign_table `_ + is used and the currently logged in user has no permissions for the + referenced table or its records. + * All items have been hidden via page TSconfig, for example, + `removeItems `_ + or `keepItems `_ + are inproperly configured. + * The `itemsProcessors `_ + or `itemsProcFunc `_ + had no result. diff --git a/Documentation/ColumnsConfig/Type/Select/SingleBox/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/SingleBox/_Properties/_ShowIfEmpty.rst.txt new file mode 100644 index 00000000..2b1b19e0 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/SingleBox/_Properties/_ShowIfEmpty.rst.txt @@ -0,0 +1,35 @@ +.. confval:: showIfEmpty + :name: select-singlebox-showIfEmpty + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['showIfEmpty'] + :type: boolean + :Scope: Display + :Default: false + + .. versionchanged:: 14.2 + Starting with TYPO3 14.2 relational fields are hidden when no selectable + items are available. This option can be used to disable the behaviour. + + By default a field of type `select` and any render type is hidden when no + select items are available. Setting `showIfEmpty` to true, shows the field + even if no options are available. + + .. code-block:: php + :caption: EXT:my_extension/Configuration/TCA/Overrides/pages.php + + $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; + + Possible reasons, why no select items are available: + + * `foreign_table `_ + was used and the referenced table has no records or none matching the + `foreign_table_where `_. + * `foreign_table `_ + was used and the currently logged in user has not permissions for the + referenced table or all of it records. + * All items have been hidden via page TSconfig, for example via + `removeItems `_ + or `keepItems `_ + is inproperly configured. + * The `itemsProcessors `_ + or `itemsProcFunc `_ + had no result. diff --git a/Documentation/ColumnsConfig/Type/Select/Tree/_Properties/_ShowIfEmpty.rst.txt b/Documentation/ColumnsConfig/Type/Select/Tree/_Properties/_ShowIfEmpty.rst.txt new file mode 100644 index 00000000..f106b248 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Tree/_Properties/_ShowIfEmpty.rst.txt @@ -0,0 +1,35 @@ +.. confval:: showIfEmpty + :name: select-tree-showIfEmpty + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['showIfEmpty'] + :type: boolean + :Scope: Display + :Default: false + + .. versionchanged:: 14.2 + Starting with TYPO3 14.2, relational fields are hidden when no selectable + items are available. Option `showIfEmpty` will disable this behaviour. + + By default, `select` fields and any render types are hidden when no + select items are available. Setting `showIfEmpty` to true displays the field + even if no options are available. + + .. code-block:: php + :caption: EXT:my_extension/Configuration/TCA/Overrides/pages.php + + $GLOBALS['TCA']['pages']['columns']['some_select_field']['config']['showIfEmpty'] = true; + + Possible reasons why no select items are available: + + * a `foreign_table `_ + is used and the referenced table has no records or none matching the + `foreign_table_where `_. + * a `foreign_table `_ + is used and the currently logged in user has no permissions for the + referenced table or its records. + * All items have been hidden via page TSconfig, for example, + `removeItems `_ + or `keepItems `_ + are inproperly configured. + * The `itemsProcessors `_ + or `itemsProcFunc `_ + had no result.