Filter a page of taxonomies by their term

In v2 I used to be able to filter a page of taxonomies with their term using the following.

{{ collection:articles paginate="true" as="posts" limit="9" taxonomy="true" }}
  {{ posts scope="categories" }}
    {{ partial:articles/articles-listing-card-lg }}
  {{ /posts }}
  {{ partial:pagination }}
{{ /collection:articles }}

This resulted in a page listing all the articles categorised as news for example if /articles/categories/news is the slug.

Upon upgrading a v2 site to v3 this no longer works for me. Playing around resulted in me working out this is down to the taxonomy="true" part of the code. Removing it allows the site to load, however, the resulting page has no categories listed.

Leaving taxonomy="true" in results the following error…

Error
Call to a member function collections() on null
http://####/articles/categories/news 

After reading https://statamic.dev/taxonomies more times than I care to mention and experimenting loads, I'm stuck! loads, I'm stuck!

Answered by Mike Martin!
>>>>>>> Answered <<<<<<<
3 Replies
2 Followers