Skip to content

Instantly share code, notes, and snippets.

@cedricziel
Last active December 31, 2015 22:39
Show Gist options
  • Save cedricziel/8054573 to your computer and use it in GitHub Desktop.
Save cedricziel/8054573 to your computer and use it in GitHub Desktop.
fluid sections/partials..
<f:section name="main">
<f:comment>
Render a slider...
</f:comment>
<div class="blubb">
<f:for each="{slides}" as="slide">
<f:comment>
v:switch might come in handy here...
</f:comment>
<f:if condition="...">
<f:then>
<f:render section="sliderLayout1" arguments="{slide: slide}"/>
</f:then>
<f:else>
<f:render section="sliderLayout2" arguments="{slide: slide}"/>
</f:else>
</f:if>
</f:for>
</div>
</f:section>
<f:section name="sliderLayout1">
<f:comment>
Variable slide come in as argument from above
</f:comment>
{slide.image -> f:debug()}
</f:section>
<f:section name="sliderLayout2">
{slide.image -> f:debug()}
</f:section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment