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 →

Page Taxonomies

Ben Crumpton November 19, 2020 by Ben Crumpton

I've got a site I'm working on and I'm struggling a bit to get a template working for a taxonomy I've got set up.

In /site/content/taxonomies I've got a locations taxonomy and locations setup within that, the pages have a custom fieldset that I've added the taxonomy to. If I add pages to a location in the control panel everything seems to work properly and the count for each page is correct.

The issue I'm having is with the template itself, I'd like to be able to loop through the taxonomy and display fields from the pages. From the examples in the documentation I'm trying:

{{ locations }} 
    {{ duration }}
{{ /locations }]

Where duration is one of the fields in the Page's fieldset, however nothing gets displayed.

If I do:

{{ dump locations }} 

In the template I'm presented with a huge array that shows the data that I'm looking to use on the page, that looks like this:

snipped the huge array

If someone could point me in the general direction of how to reference that data I'd really, really appreciate it!

>>>>>>> Unanswered <<<<<<<
2 Replies