How to use @loopSubContent

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to use @loopSubContent

Patrick Antivackis
Hello,
I try to use the @loopSubContent tag in the CMS part, but quite
unsuccessfully for the moment.
To keep it simple :
I have a node content that is a freemarker template with subcontents that
are images (all having the mapKey imageItem).
In the node content if I write the following code  :
<#list thisContent.subcontent_all as imageItem>
${imageItem}
</#list>
it renders a list of images, but if i have other things than image it
renders them also

How can I do the same with the @loopSubContent syntax in order to just keep
the subcontent with the mapKey=imageItem ?

I tried
<@loopSubContent contentId=thisContent.fields.contentId mapKey="imageItem">
${content}
</@loopSubConten>

Whatever parameters I put in the @loopSubContent tag I get a java null lang
pointer exception thrown by FreeMarkerWorker.saveValues that is called by
LoopSubContentTransform.getWriter.

Thank you in advance