ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Best method to embed multiple sets of entries

February 28, 2011 10:45pm

Subscribe [1]
  • #1 / Feb 28, 2011 10:45pm

    DavidG

    46 posts

    Trying to show a list of news entries in a jQuery carousel. Each set has 4 entries. I’m using offset for each additional set. The problem with this is that it is limited by the number of sets hardcoded into the embed code. Is there a more elegant way to show multiple loops instead of hardcoding each loop? It would be great to show the number of sets based on how many entries existed.

    <!-- Set 1 -->
    <li>
        <table><tr>
    {exp:channel:entries limit="4" channel="news" dynamic="off" }
        <td>
        <h4><a href="http://{title_permalink=news/article}">{title}</a></h4>
    <p>    {news-summary}<br />
        </td><br />
    {/exp:channel:entries}<br />
          </tr></table><br />
    </li></p>
    
    <p><!-- Set 2 --><br />
    <li><br />
        <table><tr><br />
    {exp:channel:entries limit="4" offset="4" channel="news" dynamic="off" }<br />
        <td><br />
        </p><h4><a href="http://{title_permalink=news/article}">{title}</a></h4>
    <p>    {news-summary}<br />
        </td><br />
    {/exp:channel:entries}<br />
          </tr></table><br />
    </li>

    Any ideas would be most welcome! Thanks.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases