marvvvv
(Marv M)
February 3, 2017, 4:17pm
#1
Hi guys,
how can I label childnodes of a page in the structremenu?
I tried this:
'TYPO3.Neos.NodeTypes:Page':
...
childNodes:
test1:
ui:
label: 'My custom Label'
type: 'XY.xy:ContentCollection'
test2:
label: 'My custom Label'
type: 'XY.xy:ContentCollection'
Is there any possibility at all?
mficzel
(Martin Ficzel)
February 3, 2017, 10:47pm
#2
Hello Marv,
a nodeType has a label
property you can use for that. In the label you can define via eel how the label will be rendered in the structure and navigate components.
See: http://neos.readthedocs.io/en/stable/CreatingASite/NodeTypes/NodeTypeDefinition.html
Make sure to not mix this up with the ui.label
of the nodetype which is the title that is used in the create node-dialog.
In your case you could either define a special Content Collection:
XY.xy:ContentCollection.Test1:
label: "${'Your custom label definition'}"
superTypes:
TYPO3.Neos:ContentCollection
ui:
label: 'Test 1 Content Collection'
Or adjust the label that is generated for Content Collections
TYPO3.Neos:ContentCollection:
label: "${custom collection label eel}"
This here is the label-generator that is default for nodes:
# Base node, which just configures the "removed" property of the node.
'TYPO3.Neos:Node':
label: "${String.cropAtWord(String.trim(String.stripTags(String.pregReplace(q(node).property('title') || q(node).property('text') || ((I18n.translate(node.nodeType.label) || node.nodeType.name) + (node.autoCreated ? ' (' + node.name + ')' : '')), '/<br\\W*?\\/?>|\\x{00a0}|[[^:print:]]|\\s+/u', ' '))), 100, '...')}"
abstract: TRUE
ui:
inspector:
tabs:
default:
label: i18n
position: 10
icon: 'icon-pencil'
meta:
label: i18n
Regards, Martin
2 Likes