Alright. So here’s what may blow your mind. The switch variable is not only applicable to classes - it can conditionally insert code at predefined intervals (determined by what you pipe into it) if you get clever with it. So here goes:
{exp:channel:entries channel="channel" disable="categories|member_data|pagination" sort="asc"}
{switch="<div class='panel'><div class='panel-wrapper'>|"}
<!-- ENTRIES -->
<div class="client-content {switch="odd|even"}">
{client_logo_small}
<h2 class="underline">{title}</h2>
{exp:word_limit total="14"}
{epic_partner_excerpt}
{/exp:word_limit}
<ul>
<li><a href="#">Contact</a></li>
<li><a href="#">Profile</a></li>
</ul>
</div><!--end client content-->
{switch="|</div></div>"}
{/exp:channel:entries}
To explain…
The first instance of switch inserts the opening of the panel and panel wrapper divs BEFORE the odd instances of entries (1, 3, 5, 7, etc.).
The second instance of switch inserts an additional class on your client-content div - even and odd - to give you a bit of targeted formatting control of one versus the other (if you need margin on the left one and no margin on the right one, assuming they’re side by side, for example.
The third and final instance of switch inserts the closing of the panel wrapper and panel divs AFTER the even instances of entries (2, 4, 6, 8, etc).
That’s how I’ve started using switch, so unless I’ve typo’d something here, it ought to work for you too. Please give it a try and let me know how you make out. One caveat - since this may not be the “typical” use of switch, I’m not certain if this has performance implications. It didn’t seem to slow anything down for me, but please be forewarned that I don’t know for sure if this is as smart a way to use switch as I think it may be. 😊
Cheers,
John