Hallo Zusammen
Wir sind dabei unsere Seite von Neos 1.0 auf 1.1 upzudaten. Hat soweit auch alles geklappt, nur bei einem selbst definierten NodeType haben wir ein Problem:
Failed to render element
page<TYPO3.Neos:Page>/
body<TYPO3.TypoScript:Template>/
content/
heading<OurVendor.NeosHome:Carousel>/
items/
__meta/
override/
contentCollectionNode
No content collection of type TYPO3.Neos:ContentCollection could be found in the current node (/sites/neoshome/produkte) or at the path "carouselItems". You might want to adjust your node type configuration and create the missing child node through the "flow node:autocreatechildnodes --node-type TYPO3.Neos.NodeTypes:Page" command. (20140924174618600122)
Die Page (Produkte ist die aktuell aufgerufene Seite) enthält einen Headerbereich, indem Content Elemente als Elemente eines Carousels ausgegeben werden sollen. Das Carousel der Neos Demo Page scheint leider nicht zu funktionieren, daher unsere eigene Umsetzung.
Sites/OurVendor.NeosHome/Configuration/NodeTypes.yaml:
'TYPO3.Neos.NodeTypes:Page':
childNodes:
heading:
type: 'OurVendor.NeosHome:Carousel'
footer:
type: 'TYPO3.Neos:ContentCollection'
'OurVendor.NeosHome:Carousel':
superTypes: ['TYPO3.Neos:Content']
childNodes:
carouselItems:
type: 'TYPO3.Neos:ContentCollection'
ui:
label: 'Carousel'
group: 'plugins'
icon: 'icon-picture'
inlineEditable: TRUE
Sites/OurVendor.NeosHome/Resources/Private/TypoScript/Library/NodeTypes/Carousel.ts2:
prototype(OurVendor.NeosHome:Carousel) < prototype(TYPO3.Neos:Content) {
templatePath = 'resource://OurVendor.NeosHome/Private/Templates/TypoScriptObjects/Carousel.html'
carouselItems = TYPO3.Neos:ContentCollection
carouselItems {
nodePath = 'carouselItems'
}
}
Sites/OurVendor.NeosHome/Resources/Private/TypoScript/Library/Root.ts2:
include: NodeTypes/Carousel.ts2
...
namespace: TypoScript=TYPO3.TypoScript
page = Page {
...
body {
...
content {
heading = OurVendor.NeosHome:Carousel {
nodePath = 'heading'
carouselItems = TYPO3.Neos:ContentCollection {
nodePath = 'carouselItems'
collection = ${q(node).children()}
}
}
main = PrimaryContent {
nodePath = 'main'
}
}
...
}
}
Sites/OurVendor.NeosHome/Resources/Private/Templates/TypoScriptObjects/Carousel.html
{namespace neos=TYPO3\Neos\ViewHelpers}
{namespace ts=TYPO3\TypoScript\ViewHelpers}
<div{attributes -> f:format.raw()}>
<div class="carousel slide" id="{node.identifier}">
<!-- Wrapper for slides -->
<ts:render path="carouselItems" />
<!-- Controls -->
<a class="left carousel-control" href="#{node.identifier}" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="right carousel-control" href="#{node.identifier}" data-slide="next">
<span class="icon-next"></span>
</a>
</div>
</div>
Hat jemand eine Idee, was wir falsch gemacht haben? Wir haben uns an http://docs.typo3.org/neos/TYPO3NeosDocumentation/IntegratorsCookbook/WrappingListOfContentElements.html gehalten und auch schon flow node:autocreatechildnodes --node-type TYPO3.Neos.NodeTypes😛age ausgeführt und viele Male den Cache gelöscht. Leider alles ohne Erfolg.