[TYPO3-mvc] Generating Javascript arrays/objects
Martin Kokes
martin at typo3-hosting.com
Fri Aug 2 16:33:01 CEST 2013
Hi everyone,
just my thoughts, is there a smarter way for generating filtered (here by nodeType) Javascript arrays/objects (without last comma) in Fluid than:
<f:groupedFor each="{project.layers}" as="layers" groupBy="nodeType" groupKey="nodeType">
<f:if condition="{nodeType} == 0">
<f:for each="{layers}" as="layer" iteration="layerIterator">
{
text: '<v:var.get name="layer.layerName" />',
expanded: true,
children: [
<f:render section="children" arguments="{children: layer.children}" />
]
}{f:if(condition: layerIterator.isLast, then: '', else: ',')}
</f:for>
</f:if>
</f:groupedFor>
?
Any other viewhelper combination (fluid, vhs)?
Thanks for any advices
Martin
More information about the TYPO3-project-typo3v4mvc
mailing list