Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taxonomies Within Taxonomies? #35

Closed
bobrocke opened this issue Aug 26, 2014 · 1 comment
Closed

Taxonomies Within Taxonomies? #35

bobrocke opened this issue Aug 26, 2014 · 1 comment
Labels

Comments

@bobrocke
Copy link

Say blog posts have categories. And they have tags.

Is there a mechanism in Grav to return all the tags used in a given category?

And a mechanism to return all the posts that have a given category and given tag?

@rhukster
Copy link
Member

  1. You are asking for all the page tags in a given category? You could get all the pages for a category taxonomy, then loop through them to build an array of tags used.
  2. You can find pages that match a given category and tag with something like:

{% for post in taxonomy.findTaxonomy({'category:'blog','tags':['animal','cat']}) %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants