[TYPO3-english] 6.2 TCA pages|backend_layout (& _next_level) items changes as it should be?

Jigal van Hemert jigal.van.hemert at typo3.org
Tue Feb 11 09:50:06 CET 2014


Hi,

On 10-2-2014 17:12, Philipp Gampe wrote:
> Jigal van Hemert wrote:
>
>> It is true that you can't change the label for items without a value.
>> Maybe the solution to use 0 as default value would be better.
>> Can you file an issue for this?
>>
>> [1] http://forge.typo3.org/issues/52596
>> [2] https://review.typo3.org/24882
>
> Actually it was a 0 all time long until we change the DB field from integer
> to string in order to support additional providers.
> We fixed the default value from an empty string to 0 shortly after that.

In current master:

   backend_layout varchar(64) DEFAULT '' NOT NULL,
   backend_layout_next_level varchar(64) DEFAULT '' NOT NULL,


'backend_layout' => array(
   'exclude' => 1,
   'label' => 
'LLL:EXT:cms/locallang_tca.xlf:pages.backend_layout_formlabel',
   'config' => array(
     'type' => 'select',
     'items' => array(
       array('', ''),
       array('LLL:EXT:cms/locallang_tca.xlf:pages.backend_layout.none', -1)
     ),
     'itemsProcFunc' => 
'TYPO3\\CMS\\Backend\\View\\BackendLayoutView->addBackendLayoutItems',
     'selicon_cols' => 5,
     'size' => 1,
     'maxitems' => 1,
   )
),
'backend_layout_next_level' => array(
   'exclude' => 1,
   'label' => 
'LLL:EXT:cms/locallang_tca.xlf:pages.backend_layout_next_level_formlabel',
   'config' => array(
     'type' => 'select',
     'items' => array(
       array('', ''),
       array('LLL:EXT:cms/locallang_tca.xlf:pages.backend_layout.none', -1)
     ),
     'itemsProcFunc' => 
'TYPO3\\CMS\\Backend\\View\\BackendLayoutView->addBackendLayoutItems',
     'selicon_cols' => 5,
     'size' => 1,
     'maxitems' => 1,
   )
)

Everywhere it says the default value is an empty string.

This wouldn't be a problem if it were possible to change the label of an 
item in a select box which has an empty string as a value through 
TSconfig. Unfortunately you need to specify the value for which you want 
to change the label.
Therefore it isn't such a good idea to use empty strings as values for 
items in a select box.

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list