Created
July 29, 2015 15:02
-
-
Save seb-thomas/21668b159d8178219a99 to your computer and use it in GitHub Desktop.
Craft SuperTable in a Matrix, implementing variable column width
This file contains hidden or 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
| <div class="module casestudy-awards"> | |
| <div class="container"> | |
| {% for block in entry.awards %} | |
| <div class="row"> | |
| <div class="col-sm-12"> | |
| <h3 class="module-title"> | |
| {%- if block.moduleTitle | length -%} | |
| {{- block.moduleTitle -}} | |
| {%- else %}Awards won{% endif -%} | |
| </h3> | |
| </div> | |
| </div> | |
| <div class="row"> | |
| {% set colCount = block.award | length %} | |
| {% for column in block.award %} | |
| <div class="col-sm-{% if colCount == 1 %}12{% elseif colCount == 2 %}6{% elseif colCount == 3 %}4{% endif %}">{{ column.awardTitle }}</div> | |
| {% endfor %} | |
| </div> | |
| {% endfor %} | |
| </div> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment