Last active
August 29, 2015 14:28
-
-
Save nathanpitman/984030fd5d5cf6799b1d to your computer and use it in GitHub Desktop.
ExpressionEngine switch, always be closing (Feature Request)
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
{exp:channel:entries} | |
{switch values='<div class="row">||'} | |
<div class="col-md-4"> | |
{sn_programme_block} | |
</div><!-- / .col-md-4 --> | |
{switch values='||</div><!-- / .row -->' closing='</div><!-- / .row -->'} | |
{/exp:channel:entries} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"closing" parameter allows you to pass a value that a switch loop should always close with if the last 'switch group' is not equal to the number of switch values provided. i.e. in the case above if there were 1 or 2 results in the last switch group the closing would never be applied.