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 →

Taxonomy Listing is skipping entries

Jon Hicks March 4, 2020 by Jon Hicks

I have a taxonomy list of countries, with a taxonomy field to relate that country with the names of various projects.

What's odd is that the listing skips some entries, and I can't work out why it shows some and not others. There should be 60, but only 24 are output.

Here's the template:

       <ul class="country-list">
           {{ taxonomy:country sort="title:asc" }}
           {{ if project_relation }}
                   <li>{{ title }}</li>
           {{ /if }}
           {{ /taxonomy:country }}

The list is filtered by using {{ if project_relation }}, so only countries where that field has a value is shown. I've also tried setting this as a parameter on the taxonomy tag, but with no difference.

I've compared the yaml files of countries that do work, with the ones that are being missed out, and can't see anything that would cause it. I've also checked permissions to make sure all the yaml files are readable (set to 777 to be sure).

Any pointers gratefully received!

Answered by Jon Hicks!
>>>>>>> Answered <<<<<<<
1 Reply
1 Follower