[Neos] ChildNodes initially not in backend and editing doesn't work
Robert Sternberg
rob at shadaim.de
Thu Feb 19 11:52:28 CET 2015
Hey,
I'm trying to set up my own page structure and custom node types.
I just wanted to add some collections to the usual Page type and create a slider with slider elements:
'TYPO3.Neos.NodeTypes:Page':
childNodes:
'slider':
type: 'ACME.SomeUrl:Slider'
'teaser':
type: 'TYPO3.Neos:ContentCollection'
constraints:
nodeTypes:
'*': FALSE
'TYPO3.Neos.NodeTypes:Headline': TRUE
'TYPO3.Neos.NodeTypes:Text': TRUE
'TYPO3.Neos.NodeTypes:Image': TRUE
'footer':
type: 'TYPO3.Neos:ContentCollection'
ui:
inspector:
groups:
image:
label: 'Image'
position: 200
properties:
'layout':
ui:
inspector:
group: 'layout'
editorOptions:
values:
'default':
label: 'Default'
'landingPage':
label: 'Landing page'
'subpageLayout':
ui:
inspector:
group: 'layout'
editorOptions:
values:
'default':
label: 'Default'
'landingPage':
label: 'Landing page'
'image':
type: TYPO3\Media\Domain\Model\ImageVariant
ui:
label: 'Image'
reloadIfChanged: TRUE
inspector:
group: 'image'
position: 50
editorOptions:
crop:
aspectRatio:
locked:
width: 1600
height: 570
'imageTitleText':
type: string
ui:
label: 'Title text'
reloadIfChanged: TRUE
inspector:
group: 'image'
position: 100
# Slider and SliderElement
'ACME.SomeUrl:Slider':
superTypes: ['TYPO3.Neos:Content']
childNodes:
sliderItems:
type: 'TYPO3.Neos:ContentCollection'
constraints:
nodeTypes:
'*': FALSE
'ACME.SomeUrl:SliderElement': TRUE
ui:
label: 'Slider'
icon: 'icon-folder-open-alt'
inlineEditable: TRUE
'ACME.SomeUrl:SliderElement':
superTypes: ['TYPO3.Neos:Content']
childNodes:
image:
type: 'TYPO3.Neos.NodeTypes:Image'
text:
type: 'TYPO3.Neos.NodeTypes:Text'
ui:
label: 'Slider Element'
group: 'general'
icon: 'icon-picture'
(See with indentions here: http://pastebin.com/a2LRkwTn)
The Page customising is mostly copied from the demo site.
Whenever I create a new page I get the childnodes. When I './flow node:repair ...' it is also available in my root node page and previously created pages. All good so far.
Problem is, I can select the 'main' content collection in the BE, left hand side. When I click on it the right hand sidebar updates to the selected node type. If I add an element, it is added and the orange hightlighting appears. If I do the same with my 'teaser' or 'footer' collection, this does not happen.
I can also add a ACME.SomeUrl:Slider node to the 'main' content collection. It adds it, highlight it orange, but 1. doesn't show the content collection 'sliderItems' nodes, and 2. lets me add any type of node, which should be suppressed. I works after I refresh, either the whole window or just the current page nodes in the lower left hand side pane. But even after that, added elements don't get highlighted and I can't edit the SliderElement childnodes 'Image' and 'Text' In the database it's in workspace 'user-myuser' and when I refresh the whole window it also shows the top right hand arrow orange with a few changes to publish, but still not the actual element.
Any ideas why that is? Am I missing something? It seems to only work with the originally defined childnodes.
Thanks in advance.
More information about the Neos
mailing list