Created
May 24, 2013 12:27
-
-
Save brandonkelly/5643159 to your computer and use it in GitHub Desktop.
Upcoming BaseOptionsFieldType templating options
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
{% if entry.drinkAttributes.contains('alcoholic') %} | |
Alcoholic! | |
{% else %} | |
Not alcoholic | |
{% endif %} | |
<h2>Selected Attributes</h2> | |
<table> | |
{% for attr in entry.drinkAttributes %} | |
<tr> | |
<td>{{ attr }}</td> | |
<td>{{ attr.value }}</td> | |
<td>{{ attr.label }}</td> | |
</tr> | |
{% endfor %} | |
</table> | |
<h2>All Attributes</h2> | |
<table> | |
{% for attr in entry.drinkAttributes.options %} | |
<tr> | |
<td>[ {{ attr.selected ? '√' : ' ' }} ]</td> | |
<td>{{ attr }}</td> | |
<td>{{ attr.value }}</td> | |
<td>{{ attr.label }}</td> | |
</tr> | |
{% endfor %} | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment