ich habe mir gerade nach diesem Tutorial versucht einen Seiten-Content-Type anzulegen.
Leider bekomme ich folgende Fehlermeldung:
Exception #1332493995 in line 417 of /Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_Fusion_Core_Runtime.php: The Fusion object `TheFreeman.Site:HeaderSlider` cannot be rendered:
Most likely you mistyped the prototype name or did not define
the Fusion prototype with `prototype(TheFreeman.Site:HeaderSlider) < prototype ...` .
Other possible reasons are a missing parent-prototype or
a missing `@class` annotation for prototypes without parent.
It is also possible your Fusion file is not read because
of a missing `include:` statement.
Ich habe mein NodeTypes.Content.HeaderSlider.yaml angelegt.
Thank you for your quick reply.
But it didn’t fix the Problem, as it seems.
prototype(TheFreeman.BacherInDe:Content.HeaderSlider) < prototype(Neos.Neos:Content) {
carouselItems = Neos.Neos:ContentCollection {
nodePath = 'carouselItems'
content.iterationName = 'carouselItemsIteration'
attributes.class = 'carousel-inner'
}
// Collect the carousels children but only images
carouselItemArray = ${q(node).children('carouselItems').children('[instanceof Neos.NodeTypes:Image]')}
// Enhance image prototype when inside the carousel
prototype(Neos.NodeTypes:Image) {
// Render images in the carousel with a special template.
templatePath = 'resource://TheFreeman.BacherInDe/Private/Templates/FusionObjects/HeaderSlider.html'
// The first item should later be marked as active
attributes.class = ${'item' + (carouselItemsIteration.isFirst ? ' active' : '')}
// We want to use the item iterator in fluid so we have to store it as variable.
iteration = ${carouselItemsIteration}
}
}
Please excuse, but I’m a bloody neewbie to NEOS
Or must I delete somwhere a Cache, or similar, bevore it will take effect?
It is possible that you have to define the templatePath also for the protptype(TheFreeman.BacherInDe:Content.HeaderSlider) and not only for ``prototype(Neos.NodeTypes:Image)`
Implementing Siders is not the ideal topic to get into neos as those really have their challenges when used for inline editing with the Neos Backend. That is nothing js sliders are usually build for. I recommend to start with simpler contents and try carousels once you get more familiar.