I want to add more dropdown fields to the appearance tab for editing content elements. 
How can I achieve this?
I've tried to add more layouts for the pageTs but that doesn't work. Also couldn't find more on this on the internet.
I want to add more dropdown fields to the appearance tab for editing content elements. 
How can I achieve this?
I've tried to add more layouts for the pageTs but that doesn't work. Also couldn't find more on this on the internet.
You can't do this via the backend. You will need to extend the TCA (e.g. in your sitepackage extension).
In your extension:
ext_tables.sqlConfiguration/TCA/Overrides/tt_content.php:Tip: You can look at the active TCA configuration for tt_content in the TYPO3 backend Configuration | Globals['TCA']
If you want to place the new field after an existing field, e.g. space_before_class, check which palette this is in ('frames') and place it in that.
ext_tables.sql:
CREATE TABLE tt_content(
my_new_field TINYINT(1) UNSIGNED DEFAULT '0' NOT NULL
);
Configuration/TCA/Overrides/tt_content.php
$fields = [
// new field
'my_new_field' => [
// title of the field
// alternatively, just use a string, but putting the string in
// language file eases translations
'label' => 'LLL:EXT:myextension/Resources/Private/Language/locallang.xlf:tt_content.my_new_field.title',
'config' => [
// type: select
'type' => 'select',
'renderType' => 'selectSingle',
'default' => 0,
'items' => [
[
// again, better to use language label LLL here
'description',
// value
0
],
[
// another option
'description 2',
// value
1
],
],
],
],
// ...
];
// Add new fields to table:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $fields);
// Add new field to palette 'frames'
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette(
'tt_content',
'frames',
'my_new_field',
'before:frame_class'
);
If you could live just with more options to the given fields you can do it in the BE without programming / extending the TCA (Sybille's answer).
Extending the given list of select options for the existing fields is possible with some page/user TSConfig like:
TCEFORM.tt_content.layout.addItems {
20 = additional layout 1|nyt layout 1|neues Layout 1|...
25 = additional layout 2|nyt layout 2|neues Layout 2|...
}
TCEFORM.tt_content.frame_class.addItems {
50 = frame-class-50
55 = frame-class-55
}
Of cause this needs a handling in the rendering of the CEs.
Depending on the TYPO3 version and the active rendering there are different places to handle this.
Without FLUID rendering it needs some edits in the typoscript, with FLUID you need to override the appropriate file (layout/template/partial) where the field (here: layout and frame_class) is handled.