-
-
Save pumatertion/6c025a928597161bc543 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prototype(IVI.NodeTypes:Visuals) < prototype(TYPO3.TypoScript:Template){ | |
templatePath = 'resource://IVI.NodeTypes/Private/Templates/NodeTypes/Carousel.html' | |
carouselItems = TYPO3.Neos:ContentCollection { | |
nodePath = 'visuals' | |
iterationName = 'carouselItemsIteration' | |
attributes.class = 'carousel-inner' | |
itemRenderer = TYPO3.Neos:ContentCase { | |
default { | |
@position = 'end' | |
condition = ${q(node).is('[instanceof TYPO3.Neos.NodeTypes:Image]') | |
type = ${q(node).property('_nodeType.name')} | |
} | |
} | |
} | |
// Enhance image prototype for the carousel | |
prototype(TYPO3.Neos.NodeTypes:Image) { | |
// Render images in the carousel with a special template. | |
templatePath = 'resource://IVI.NodeTypes/Private/Templates/TypoScriptObjects/CarouselItem.html' | |
attributes.class = ${'item' + (carouselItemsIteration.isFirst ? ' active' : '')} | |
// We want to use the item iterator in the template so we have to store it in ts. | |
iteration = ${carouselItemsIteration} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment