New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

How to check if entry already displayed

Max Glass May 13, 2019 by Max Glass

Hi guys!

I have an collection and I displayed the entries of this collection on a feed page. This feed page has an "highlight box", in which the latest article is displayed. Underneath that all other articles are displayed AND the one already displayed inside the "highlight box" is too. But it shouldn't. It only should be displayed in the "latest-article-container" and not underneath it in the entry listing.


{{ collection from="blog" as="articles" }}
        {{ if no_results }}
            <h5>No articles to read!</h5>
        {{ /if }}
        {{ articles condition="ONLY LATEST ARTICLE OF COLLECTION" }}
        <!-- Highlight -->
            {{ partial:highlight }}
        {{ /articles }}
        <!-- Blog Articles -->
        <div class="cards-wrapper">
        {{ articles condition="WITHOUT LATEST ARTICLE OF COLLECTION" }}
            {{ partial:card }}
        {{ /articles }}
    {{ /collection }}

Would be glad of someone knows how what's the trick.

Cheers Max

Answered by Greg Colker!
>>>>>>> Answered <<<<<<<
3 Replies