Skip to content

Instantly share code, notes, and snippets.

@cedricziel
Created March 23, 2015 19:31
Show Gist options
  • Save cedricziel/cd52ad919e21a630b2ba to your computer and use it in GitHub Desktop.
Save cedricziel/cd52ad919e21a630b2ba to your computer and use it in GitHub Desktop.
Quick rendering of ce's with a custom template overlay
<f:for each="{newsItem.contentElements}" as="element">
<f:if condition="{element.CType} == 'text'">
<f:comment>
This is a text element, you could vary the rendering depending on multiple conditions:
* CType
* layout
* frame
You would separate those into partials
</f:comment>
<h{element.headerLayout}>
{element.header}
</h{element.headerLayout}>
<div class="textelement">
{element.bodytext -> f:format.html()}
</div>
</f:if>
</f:for>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment