[Neos] Wrapping *each* children of ContentCollection with custom markup

Pankaj Lele pankaj at lelesys.com
Thu Apr 17 07:39:16 CEST 2014


Hi Marcin,

try this one

prototype(M12.Foundation:BlockGrid) < prototype(M12.Foundation:Content) {
	blockGridContent = TYPO3.TypoScript:Collection {
		collection = ${q(node).children('[instanceof 
TYPO3.Neos:ContentCollection]').children()}
		itemName = 'gridItem'
		itemRenderer = TYPO3.Neos:ContentCase
	}
}

{namespace ts=TYPO3\TypoScript\ViewHelpers}
<li>
  <ts:render path="blockGridContent" />
</li>


> Hi guys,
> 
> I'm struggling with wrapping *each* children of ContentCollection into 
> my custom markup.
> 
> I tried this way
> 
> prototype(M12.Foundation:Content) < prototype(TYPO3.Neos:Content)
>  
> prototype(M12.Foundation:BlockGrid) < prototype(M12.Foundation:Content) {
> 	blockGridContent = TYPO3.TypoScript:Collection {
> 		collection = ${q(node).children('[instanceof 
> TYPO3.Neos:ContentCollection]').children()}
>  
> 		itemName = 'gridItem'
> 		itemRenderer = TYPO3.Neos:Content {
> 		  node = ${gridItem}
> 			templatePath = 
> 'resource://M12.Foundation/Private/Templates/NodeTypes/BlockGridItem.html' 
> 
> 		}
> 	}
> }
> 
> But have no idea now, how to render it in my template...
> {namespace ts=TYPO3\TypoScript\ViewHelpers}
> <li>
>   <ts:render path="node" />
> </li>
> 
> It renders... correct node path, but I just want the whole node 
> rendered, whatever it is (text, image etc).
> 
> Any suggestions?
> Many thanks,
> M.
> 
> 
> [1] https://gist.github.com/ryzy/10925362


-- 
Pankaj Lele
CTO - Lelesys, India
http://www.lelesys.com
Twitter: @pankajlele



More information about the Neos mailing list