Reputation: 1269
In TYPO3 I want to add several custom content element layouts to the existing ones of the default content type "Header". The custom layouts should make it possible, to make a header that is originally an H1 header look like H2 or H3, for instance.
So I added this Typoscript code, that is supposed to add the additional options to the interface in the backend:
TCEFORM {
tt_content {
layout {
altLabels {
0 = abc
1 = def
2 = geh
3 = Layout H1
4 = Layout H2
5 = Layout H3
}
removeItems = 6,7,8,9,10
}
}
}
As well as this, that should add the CSS classes:
tt_content.stdWrap.innerWrap.cObject = CASE
tt_content.stdWrap.innerWrap.cObject {
key.field = layout
3 = TEXT
3.value = like-h1
4 = TEXT
4.value = like-h2
5 = TEXT
5.value = like-h3
}
However, of my 3 additional layouts, only one is added to the interface in the backend:
No matter what I try, I can't get the other two layouts to be added to the dropdown list in the backend. What could be a reason for this?
Upvotes: 4
Views: 4194
Reputation: 423
By default there are only 4 Layouts (0 = Standard and 1-3 = Layout 1-3) . By using altLabels you can only rename existing layouts. So to get more Layouts you need to add them
TCEFORM.tt_content.layout {
addItems {
4 = my Layout 4
5 = my Layout 5
}
}
Upvotes: 7