Firstly my apologies if this has been discussed before, I fear it may be somewhere I cannot find.
I am utilising some jQuery Tools sliding panels of content on a page - fairly common strategy now.
Each panel has 4 small content snippets in and then the user can shift to the next panel and see another four and so on.
The code, stripped bare looks like this:
<section class="scrollable">
<section class="items">
<div>
<article>
<!-- Content Here -->
</article>
<article class="omega">
<!-- Content Here -->
</article>
<article>
<!-- Content Here -->
</article>
<article class="omega">
<!-- Content Here -->
</article>
</div>
<div>
<article>
<!-- Content Here -->
</article>
<article class="omega">
<!-- Content Here -->
</article>
<article>
<!-- Content Here -->
</article>
<article class="omega">
<!-- Content Here -->
</article>
</div>
</section>
</section>Each panel is represented by a div containing four articles. Pretty straighforward.
Question is now can I build this dynamically with a channel entries tag. Taking a traditional approach:
<div>
{exp:channel:entries channel="news"}
<article>
<!-- Content Here -->
</article>
<article class="omega">
<!-- Content Here -->
</article>
<article>
<!-- Content Here -->
</article>
<article class="omega">
<!-- Content Here -->
</article>
{/exp:channel:entries}
</div>This would simply fill the panel with all entries. Placing the EE tags outside the div would create a panel for every entry.
How can I fill each panel with four entries, without having to set up additional loops which would of course also keep pulling in the same 4 entries without further selection.
Or is the easiest approach to find a javascript implementation which doesn’t rely on semantic encapsulation of the panel contents?
Thanks
[Mod Edit: Moved to the Community Help forum]