Content types by taxonomy


#1

We will have one taxonomy across the new digital.gov, and are wondering —

Is it possible to use the same taxonomy to list/sort multiple content-types?

For example, can I have a template (URL) that shows all events tagged with “agile”
(not sure what the URL would be :thinking: )

while also having another template (URL) that shows all posts tagged with “agile”
(at the moment, this is the URL https://demo.digital.gov/topics/agile/ )


#2

In my opinion yes. You would need 2 different templates and you can determine in front matter of the page which one should be used. In the template you range with where through the events or posts.


#3

Okay, gonna be kinda philosophical, but… no. :slight_smile:

Because that isn’t a taxonomy. You want two different taxonomies. One for events, and one for posts. Unless you have a third context that shows all of them.

As for the templates, I suppose you might be able to produce a custom output format that was basically identical to the base output, but filtered the range differently.

But without understanding more of why you want that, I wouldn’t suggest one way or another. Maybe you just need events related to a term, and not actually listed under it. Lots of options there. :thinking:


#4

@jeremyzilar
Does this thread help?