Hallo,
ich möchte gerne einen Wrapper-NodeType "IconModule" direkt mit "IconModuleCard"-NodeTypes befüllen. Dafür habe ich zwei NodeTypes in der NodeTypes.yaml angelegt. Beide haben die Eigenschaft "inlineEditable: TRUE" und der Wrapper kann nur die Icon-Cards als Kindelemente bekommen. Die Icon-Card besteht aus einem Icon und etwas Text:
# Icon Modul
## Wrapper
'feneos.raschmidt:IconModule':
superTypes:
- 'TYPO3.Neos:Content'
constraints:
nodeTypes:
'feneos.raschmidt:IconModuleCard': TRUE
'*': FALSE
ui:
label: 'Modul mit Icon Karten'
group: 'raschmidt'
inlineEditable: TRUE
## Icon-Card
'feneos.raschmidt:IconModuleCard':
superTypes:
- 'TYPO3.Neos:Content'
ui:
label: 'Icon Karte für Icon Karten Modul'
group: 'raschmidt'
inlineEditable: TRUE
inspector:
groups:
iconcardsettings:
label: 'Icon Karte Einstellungen'
properties:
icon:
type: string
defaultValue: 'firstChildNode'
ui:
label: 'Icon'
inspector:
group: 'iconcardsettings'
editor: 'TYPO3.Neos/Inspector/Editors/SelectBoxEditor'
editorOptions:
values:
icon-group:
label: 'icon-group'
icon-trending:
label: 'icon-trending'
icon-build:
label: 'icon-build'
text:
type: string
defaultValue: 'Geben Sie hier den gewünschten Text ein.'
ui:
inlineEditable: TRUE
Die Icon-Cards füge ich über eine Collection in den Wrapper ein: IconModule.ts2
prototype(feneos.raschmidt:IconModule) < prototype(TYPO3.Neos:Content) {
templatePath = 'resource://feneos.raschmidt/Private/Templates/NodeTypes/IconModule.html'
contentCollection = TYPO3.TypoScript:Collection {
collection = ${q(node).children()}
itemName = 'element'
itemRenderer = TYPO3.TypoScript:Template {
templatePath = 'resource://feneos.raschmidt/Private/Templates/NodeTypes/IconModuleCard.html'
element = ${element}
}
}
}
In der View füge ich es einfach über: IconModule.html
<div class="col">
{contentCollection -> f:format.raw()}
</div>
ein.
Die Texte der Icon-Cards werden auch angezeigt, nur kann ich sie nicht inlineeditieren und auch im Inspector kein Icon auswählen.
Könnt ihr mir sagen, wo mein Fehler liegt?
Gruß
lebase