Neos 2.0 JavaScript based slider / carousel

Hi everyone,

if someones uses the javascript carousel of the integratorscookbook and it doesn´t work anymore.

You have to change:

iterationName = 'carouselItemsIteration'


content.iterationName = 'carouselItemsIteration'

in your TypoScript (Sites/Vendor.Site/Resources/Private/TypoScript/NodeTypes/Carousel.ts2):

prototype(Vendor.Site:Carousel) {
        carouselItems = TYPO3.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 TYPO3.Neos.NodeTypes:Image]')}

        // Enhance image prototype when inside the carousel
        prototype(TYPO3.Neos.NodeTypes:Image) {
                // Render images in the carousel with a special template.
                templatePath = 'resource://Vendor.Site/Private/Templates/TypoScriptObjects/CarouselItem.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}

I just wanted to share, cause it took me hours to find the needle :wink:

The change was documented in the breaking changes of neos 2.0:

Hi Andy

Thanks for posting and sorry that the documentation was out of date. Would you be up for pushing a pull request to fix it on Github? You simply click the edit icon on and make the adjustment, then submit the change as a pull request for the 2.0 branch (not master).


I had the same error a while ago. I’ve created a pull request ->

1 Like