Skip to content

Instantly share code, notes, and snippets.

@nathanpitman
Last active August 29, 2015 14:28
Show Gist options
  • Save nathanpitman/5e812e2a984da5301cf2 to your computer and use it in GitHub Desktop.
Save nathanpitman/5e812e2a984da5301cf2 to your computer and use it in GitHub Desktop.
ExpressionEngine switch, always be closing
{exp:channel:entries}
{switch='<div class="row">||'}
<div class="col-md-4">
{sn_programme_block}
</div><!-- / .col-md-4 -->
{if count!=total_results}{switch='||</div><!-- / .row -->'}{/if}
{if count == total_results}
</div><!-- / .row -->
{/if}
{/exp:channel:entries}
@nathanpitman
Copy link
Author

How to make your switch statement always closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment