Last active
March 31, 2016 18:05
-
-
Save danielkoch/f779c82570eccbff5999 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<f:section name="Main"> | |
<f:for each="{content}" as="itemSectionObject" key="key" iteration="iteration"> | |
<v:variable.set name="?" /> | |
<v:variable.set name="?" /> | |
<fed:data.var name="objectType" value="{fed:data.func(func: 'key', arguments: {0: itemSectionObject})}" /> | |
<fed:data.var name="object" value="{fed:data.func(func: 'array_pop', arguments: {0: itemSectionObject})}" /> | |
<v:switch value="{objectType}"> | |
<v:case case="content1" break="TRUE"> | |
RENDER CONTENT1 | |
</v:case> | |
<v:case case="content2" break="TRUE"> | |
RENDER CONTENT2 | |
</v:case> | |
</v:switch> | |
</f:for> | |
</f:section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is quite ugly though. How does the array look like in full? Can there be more than one entry below key '1'?