Skip to content
Discussion options

You must be logged in to vote

Have been able to figure this out, with a lot of help from @duncanmcclean on Discord. Letting this stay in case it can help someone else later.

Using the no_results variable available inside the collection loop does the trick.

{{ collection :from='collectionSrc' as='entries' redirects='true' }}
    {{ if no_results }}
        <p>
          No entries found.
        </p>
    {{ else }}
        <ul>
            {{ entries }}
                <li class="mb-8 last:mb-0 max-w-prose mx-auto">
                    {{# Some markup here #}}
                </li>
            {{ /entries }}
        </ul>
    {{ /if }}
{{ /collection }}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by architchandra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant